newsbeuter: Fix building with unified headers

This commit is contained in:
Fredrik Fornwall 2017-07-01 00:15:06 +02:00
parent ff91813fdb
commit a7f36d3b9b
1 changed files with 5 additions and 10 deletions

View File

@ -1,17 +1,12 @@
diff -Naur newsbeuter-2.9.orig/src/utils.cpp newsbeuter-2.9/src/utils.cpp
--- newsbeuter-2.9.orig/src/utils.cpp 2015-02-19 11:56:59.000000000 +0100
+++ newsbeuter-2.9/src/utils.cpp 2016-05-30 22:48:05.751627034 +0200
@@ -37,6 +47,18 @@
diff -u -r ../newsbeuter-2.9/src/utils.cpp ./src/utils.cpp
--- ../newsbeuter-2.9/src/utils.cpp 2015-02-19 11:56:59.000000000 +0100
+++ ./src/utils.cpp 2017-07-01 00:13:42.783350794 +0200
@@ -37,6 +41,13 @@
#include <openssl/crypto.h>
#endif
+#ifdef __ANDROID__
+
+# define F_ULOCK 0 /* Unlock a previously locked region. */
+# define F_LOCK 1 /* Lock a region for exclusive use. */
+# define F_TLOCK 2 /* Test and lock a region for exclusive use. */
+# define F_TEST 3 /* Test a region for other processes locks. */
+
+#include <sys/file.h>
+inline int lockf(int fd, int cmd, off_t ignored_len) {
+ return flock(fd, cmd);
+}