[MERGED] libosmo-abis[master]: misc: Fix build failure/warning when building on alpine linux

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Holger Freyther gerrit-no-reply at lists.osmocom.org
Mon Jan 30 09:53:47 UTC 2017


Holger Freyther has submitted this change and it was merged.

Change subject: misc: Fix build failure/warning when building on alpine linux
......................................................................


misc: Fix build failure/warning when building on alpine linux

alpine linux is using the musl libc and this triggered some minor
compilation issues. Remove unused mISDN include and defines from
the general E1 input handling and address the other warnings and
errors.

/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
 #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
  ^~~~~~~

In file included from input/misdn.c:48:0:
../include/mISDNif.h:286:2: error: unknown type name 'u_int'
  u_int   id;
  ^~~~~

Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b
---
M src/e1_input.c
M src/input/ipaccess.c
M src/input/misdn.c
3 files changed, 3 insertions(+), 11 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/src/e1_input.c b/src/e1_input.c
index 2c8a541..09fea59 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -28,20 +28,12 @@
 #include <errno.h>
 #include <string.h>
 #include <time.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <arpa/inet.h>
-#include <mISDNif.h>
 
 #include <osmocom/abis/lapd.h>
-
-//#define AF_COMPATIBILITY_FUNC
-//#include <compat_af_isdn.h>
-#ifndef AF_ISDN
-#define AF_ISDN 34
-#define PF_ISDN AF_ISDN
-#endif
 
 #include <osmocom/core/linuxlist.h>
 #include <osmocom/core/talloc.h>
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 9e64471..ac84ffc 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -31,7 +31,7 @@
 #include <netinet/tcp.h>
 #include <string.h>
 #include <time.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <arpa/inet.h>
diff --git a/src/input/misdn.c b/src/input/misdn.c
index 9315e23..98a836f 100644
--- a/src/input/misdn.c
+++ b/src/input/misdn.c
@@ -41,8 +41,8 @@
 #include <errno.h>
 #include <string.h>
 #include <time.h>
-#include <sys/fcntl.h>
 #include <sys/socket.h>
+#include <sys/types.h>
 #include <sys/ioctl.h>
 #include <arpa/inet.h>
 #include <mISDNif.h>

-- 
To view, visit https://gerrit.osmocom.org/1641
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I997e45a456faedb5f370fd02ded300c1e36b791b
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list