0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-08-12 01:03:25 +00:00
Files
termux-packages/packages/android-tools/vendor_selinux_libselinux_fgets_unlocked.patch
Aditya Alok 9f39439abf bump(main/android-tools): 33.0.3p2
- Remove no longer required `pthread` patches:
    * vendor_CMakeLists.adb.txt.patch
    * vendor_CMakeLists.fastboot.txt.patch
See: 8d839f8635

- Update patch `vendor_CMakeLists.mke2fs.txt.patch`.

Signed-off-by: Aditya Alok <alok@termux.dev>

* Add `dlopen()` hack for function `int __system_properties_init(void)`

Co-authored-by: Tee KOBAYASHI <xtkoba@gmail.com>
2023-01-10 01:56:50 +00:00

29 lines
985 B
Diff

diff --git a/libselinux/src/label_internal.h b/libselinux/src/label_internal.h
index d09847c8..253ddbef 100644
--- a/vendor/selinux/libselinux/src/label_internal.h
+++ b/vendor/selinux/libselinux/src/label_internal.h
@@ -15,7 +15,7 @@
#include <selinux/label.h>
#include "sha1.h"
-#if defined(ANDROID) || defined(__APPLE__)
+#if defined(__ANDROID__) || defined(__APPLE__)
// Android and Mac do not have fgets_unlocked()
#define fgets_unlocked(buf, size, fp) fgets(buf, size, fp)
#endif
diff --git a/libselinux/src/selinux_internal.h b/libselinux/src/selinux_internal.h
index 27e9ac53..be28fa04 100644
--- a/vendor/selinux/libselinux/src/selinux_internal.h
+++ b/vendor/selinux/libselinux/src/selinux_internal.h
@@ -1,6 +1,10 @@
#include <selinux/selinux.h>
#include <pthread.h>
+#if defined(__ANDROID__)
+// Android do not have fgets_unlocked()
+#define fgets_unlocked(buf, size, fp) fgets(buf, size, fp)
+#endif
extern int require_seusers ;
extern int selinux_page_size ;