mirror of
https://github.com/openwrt/telephony.git
synced 2025-05-01 14:00:29 +08:00

libpri can not be built on macos for OpenWrt Linux target due to: 1. Makefile uses `ar` and `ranlib` (without using make variables). MacOS system ar and ranlib are not compatible with the objects generated by OpenWrt GCC toolchain. This commit adds patch to add an ability to redefine `ar` and `ranlib` tools. Upstream issue: https://issues.asterisk.org/jira/browse/PRI-188 2. Makefile detects Darwin using `uname -s` and changes build logic but it is not need for cross-platfrom build. This commit redefines OSARCH=Linux in OpenWrt Makefile 3. After redefining OSARCH=Linux, libpri Makefile uses /sbin/ldconfig that does not exist on MacOS. This commit redefines LDCONFIG=ldconfig in OpenWrt Makefile to use ldconfig provided by OpenWrt. Patch '001-fix-include-signal-h-warning.patch' was refreshed to pass CI checks. The payload of this patch was not changed. Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
23 lines
480 B
Diff
23 lines
480 B
Diff
--- a/pritest.c
|
|
+++ b/pritest.c
|
|
@@ -41,7 +41,7 @@
|
|
#include <sys/ioctl.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
-#include <sys/signal.h>
|
|
+#include <signal.h>
|
|
#include <sys/select.h>
|
|
#include <sys/wait.h>
|
|
#include <sys/resource.h>
|
|
--- a/testprilib.c
|
|
+++ b/testprilib.c
|
|
@@ -41,7 +41,7 @@
|
|
#include <sys/ioctl.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
-#include <sys/signal.h>
|
|
+#include <signal.h>
|
|
#include <sys/select.h>
|
|
#include <sys/wait.h>
|
|
#include <sys/resource.h>
|