mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-10 04:43:32 +00:00
Link against arpa/inet.h (patch upstreamed, remove in next version) Also enable building with `--enable-sixel` in anticipation of future Sixel support in the main app.
83 lines
2.3 KiB
Diff
83 lines
2.3 KiB
Diff
From 4f5a944ae3e8f7a230054b6c0b26f423fa738e71 Mon Sep 17 00:00:00 2001
|
|
From: Biswapriyo Nath <nathbappai@gmail.com>
|
|
Date: Thu, 11 Apr 2024 14:14:44 +0000
|
|
Subject: [PATCH] compat: Fix clang compiler error in Android
|
|
|
|
This includes some missing headers and function declaration and fixes
|
|
the following compiler errors.
|
|
|
|
../compat/htonll.c:27:9: error: call to undeclared function 'htonl'
|
|
27 | b = htonl (v & 0xffffffff);
|
|
| ^
|
|
|
|
../compat/ntohll.c:27:9: error: call to undeclared function 'ntohl'
|
|
27 | b = ntohl (v & 0xffffffff);
|
|
| ^
|
|
|
|
../compat/setproctitle.c:39:47: error: call to undeclared function 'getprogname'
|
|
39 | used = snprintf(name, sizeof name, "%s: %s", getprogname(), title);
|
|
| ^
|
|
|
|
../compat/imsg.c:82:9: error: call to undeclared function 'getdtablesize'
|
|
82 | >= getdtablesize()) {
|
|
| ^
|
|
---
|
|
compat.h | 5 +++++
|
|
compat/htonll.c | 1 +
|
|
compat/ntohll.c | 1 +
|
|
compat/setproctitle.c | 1 +
|
|
4 files changed, 8 insertions(+)
|
|
|
|
diff --git a/compat.h b/compat.h
|
|
index 720cd909ae..f33dcf1ae9 100644
|
|
--- a/compat.h
|
|
+++ b/compat.h
|
|
@@ -289,6 +289,11 @@ void explicit_bzero(void *, size_t);
|
|
int getdtablecount(void);
|
|
#endif
|
|
|
|
+#ifndef HAVE_GETDTABLESIZE
|
|
+/* getdtablesize.c */
|
|
+int getdtablesize(void);
|
|
+#endif
|
|
+
|
|
#ifndef HAVE_CLOSEFROM
|
|
/* closefrom.c */
|
|
void closefrom(int);
|
|
diff --git a/compat/htonll.c b/compat/htonll.c
|
|
index aef659834b..86f34b4680 100644
|
|
--- a/compat/htonll.c
|
|
+++ b/compat/htonll.c
|
|
@@ -14,6 +14,7 @@
|
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
+#include <arpa/inet.h>
|
|
#include <sys/types.h>
|
|
|
|
#include "compat.h"
|
|
diff --git a/compat/ntohll.c b/compat/ntohll.c
|
|
index c2fe1bb79c..b1f77ca734 100644
|
|
--- a/compat/ntohll.c
|
|
+++ b/compat/ntohll.c
|
|
@@ -14,6 +14,7 @@
|
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
+#include <arpa/inet.h>
|
|
#include <sys/types.h>
|
|
|
|
#include "compat.h"
|
|
diff --git a/compat/setproctitle.c b/compat/setproctitle.c
|
|
index e72ae274f3..99fad55c21 100644
|
|
--- a/compat/setproctitle.c
|
|
+++ b/compat/setproctitle.c
|
|
@@ -17,6 +17,7 @@
|
|
#include <sys/types.h>
|
|
|
|
#include <stdarg.h>
|
|
+#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "compat.h"
|