emacs: Fix building with unified headers
authorFredrik Fornwall <fredrik@fornwall.net>
Fri, 30 Jun 2017 21:39:25 +0000 (23:39 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Fri, 30 Jun 2017 21:39:25 +0000 (23:39 +0200)
packages/emacs/src-filelock.c.patch [new file with mode: 0644]

diff --git a/packages/emacs/src-filelock.c.patch b/packages/emacs/src-filelock.c.patch
new file mode 100644 (file)
index 0000000..bcf966b
--- /dev/null
@@ -0,0 +1,38 @@
+diff -u -r ../emacs-25.2/src/filelock.c ./src/filelock.c
+--- ../emacs-25.2/src/filelock.c       2017-02-03 11:25:45.000000000 +0100
++++ ./src/filelock.c   2017-06-30 23:36:35.331596590 +0200
+@@ -126,14 +126,14 @@
+ static time_t boot_time;
+ static bool boot_time_initialized;
+-#ifdef BOOT_TIME
++#if defined(BOOT_TIME) && !defined(__ANDROID__)
+ static void get_boot_time_1 (const char *, bool);
+ #endif
+ static time_t
+ get_boot_time (void)
+ {
+-#if defined (BOOT_TIME)
++#if defined (BOOT_TIME) && !defined(__ANDROID__)
+   int counter;
+ #endif
+@@ -169,7 +169,7 @@
+       }
+     }
+-#if defined (BOOT_TIME)
++#if defined (BOOT_TIME) && !defined(__ANDROID__)
+ #ifndef CANNOT_DUMP
+   /* The utmp routines maintain static state.
+      Don't touch that state unless we are initialized,
+@@ -237,7 +237,7 @@
+ #endif
+ }
+-#ifdef BOOT_TIME
++#if defined(BOOT_TIME) && !defined(__ANDROID__)
+ /* Try to get the boot time from wtmp file FILENAME.
+    This succeeds if that file contains a reboot record.