• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/nodejs/0.10.45/0003-fix-musl-USE-MISC-build-issue.patch
Martin BarkMartin Bark committed 34d4337f93c09 May 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 0bc482abeb814573251ecafb5a1e045c885b13a2 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3
Date: Mon, 25 May 2015 16:22:57 +0200
4
Subject: [PATCH 1/1] Fix musl __USE_MISC issue
5
MIME-Version: 1.0
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
8
​
9
The musl C library does not define __USE_MISC and so libuv (built-in dependency)
10
does not use the correct struct stat definition for musl.
11
​
12
The feature test macro __USE_MISC is defined by glibc if _BSD_SOURCE or
13
_SVID_SOURCE is defined.
14
​
15
The libuv build system enables the feature test macro _GNU_SOURCE for linux
16
builds.
17
​
18
Since glibc 2.19, defining _GNU_SOURCE also has the effect of implicitly
19
defining _DEFAULT_SOURCE - the replacement for _BSD_SOURCE and _SVID_SOURCE.
20
​
21
In glibc versions before 2.20, defining _GNU_SOURCE also had the effect of
22
implicitly defining _BSD_SOURCE and _SVID_SOURCE. This is also true for uClibc.
23
​
24
Alltogether, we can safely replace __USE_MISC by _GNU_SOURCE to support building
25
nodejs 0.10.x with the musl C library.
26
​
27
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
28
---
29
 deps/uv/src/fs-poll.c | 2 +-
30
 1 file changed, 1 insertion(+), 1 deletion(-)
31
​
32
diff --git a/deps/uv/src/fs-poll.c b/deps/uv/src/fs-poll.c
33
index ad27f18..094447e 100644
34
--- a/deps/uv/src/fs-poll.c
35
+++ b/deps/uv/src/fs-poll.c
36
@@ -198,7 +198,7 @@ static int statbuf_eq(const uv_statbuf_t* a, const uv_statbuf_t* b) {
37
 
38
   /* Jump through a few hoops to get sub-second granularity on Linux. */
39
 # if defined(__linux__)
40
-#  if defined(__USE_MISC) /* _BSD_SOURCE || _SVID_SOURCE */
41
+#  if defined(_GNU_SOURCE) /* _BSD_SOURCE || _SVID_SOURCE */
42
   if (a->st_ctim.tv_nsec != b->st_ctim.tv_nsec) return 0;
43
   if (a->st_mtim.tv_nsec != b->st_mtim.tv_nsec) return 0;
44
 #  else
45
-- 
46
2.4.1
47
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.