aboutsummaryrefslogtreecommitdiffstats
path: root/main/xulrunner/moz-libc-filename.patch
blob: 3e0e0fc3bf4a40ef898516767ff1cf7af6efedae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- ./configure.in.orig	2013-06-07 09:49:55.984387546 +0000
+++ ./configure.in	2013-06-07 10:48:53.749411262 +0000
@@ -273,6 +273,13 @@
 AC_SUBST(OBJCOPY)
 
 dnl ========================================================
+dnl Check the libc filename
+dnl ========================================================
+MOZ_LIBC_FILENAME=`$PYTHON -c "from ctypes.util import find_library; print(find_library('c'))"`
+AC_DEFINE_UNQUOTED(MOZ_LIBC_FILENAME, "$MOZ_LIBC_FILENAME")
+AC_SUBST(MOZ_LIBC_FILENAME)
+
+dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
 dnl Set CROSS_COMPILE in the environment when running configure
--- ./toolkit/components/osfile/osfile_unix_allthreads.jsm.orig	2013-06-07 11:06:38.269792499 +0000
+++ ./toolkit/components/osfile/modules/osfile_unix_allthreads.jsm	2013-06-07 11:09:36.714870364 +0000
@@ -39,7 +39,8 @@
 
   // Open libc
   let libc;
-  let libc_candidates =  [ "libSystem.B.dylib",
+  let libc_candidates =  [ OS.Constants.Path.libcFilename,
+                           "libSystem.B.dylib",
                            "libc.so.6",
                            "libc.so" ];
   for (let i = 0; i < libc_candidates.length; ++i) {
--- ./dom/system/OSFileConstants.cpp.orig	2013-06-07 11:48:56.341786916 +0000
+++ ./dom/system/OSFileConstants.cpp	2013-06-07 11:53:13.181079983 +0000
@@ -756,6 +753,10 @@
     return false;
   }
 
+  if (!SetStringProperty(cx, objPath, "libcFilename", NS_LITERAL_STRING(MOZ_LIBC_FILENAME))) {
+    return false;
+  }
+
   // Configure profileDir only if it is available at this stage
   if (!gPaths->profileDir.IsVoid()
     && !SetStringProperty(cx, objPath, "profileDir", gPaths->profileDir)) {