[multicat-devel] [Git][videolan/multicat][master] 5 commits: Fix build with musl libc
Massiot
gitlab at videolan.org
Thu Dec 14 18:04:54 CET 2017
Massiot pushed to branch master at VideoLAN / multicat
Commits:
19c37f8d by Clément Vasseur at 2017-11-30T16:05:49+00:00
Fix build with musl libc
- - - - -
fd0215ed by Clément Vasseur at 2017-11-30T16:12:00+00:00
Use LDFLAGS for linking
- - - - -
79334175 by Clément Vasseur at 2017-12-11T11:01:51+00:00
Add .gitignore
- - - - -
58a5f0f0 by Clément Vasseur at 2017-12-11T11:05:55+00:00
Use _DEFAULT_SOURCE to enable default libc features
Fix this warning from glibc:
/usr/include/features.h:183:3: warning: #warning "_BSD_SOURCE and
_SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
Keep _BSD_SOURCE for backward compatibility.
- - - - -
f7919edf by Clément Vasseur at 2017-12-11T18:13:59+00:00
Fix compilation on macOS
struct ip is available on Apple systems.
- - - - -
4 changed files:
- + .gitignore
- Makefile
- multicat.c
- util.h
Changes:
=====================================
.gitignore
=====================================
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+*.o
+
+/aggregartp
+/ingests
+/lasts
+/multicat
+/multicat_validate
+/multilive
+/offsets
+/reordertp
=====================================
Makefile
=====================================
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# multicat Makefile
VERSION = 2.2
-CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE -D_BSD_SOURCE
+CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE -D_BSD_SOURCE -D_DEFAULT_SOURCE
CFLAGS += -g
# Comment out the following line for Mac OS X build
LDLIBS += -lrt -pthread
@@ -31,28 +31,28 @@ $(OBJ_MULTICAT_VALIDATE): Makefile util.h
$(OBJ_MULTILIVE): Makefile util.h
multicat: $(OBJ_MULTICAT)
- $(CC) -o $@ $(OBJ_MULTICAT) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ_MULTICAT) $(LDLIBS)
ingests: $(OBJ_INGESTS)
- $(CC) -o $@ $(OBJ_INGESTS) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ_INGESTS) $(LDLIBS)
aggregartp: $(OBJ_AGGREGARTP)
- $(CC) -o $@ $(OBJ_AGGREGARTP) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ_AGGREGARTP) $(LDLIBS)
reordertp: $(OBJ_REORDERTP)
- $(CC) -o $@ $(OBJ_REORDERTP) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ_REORDERTP) $(LDLIBS)
offsets: $(OBJ_OFFSETS)
- $(CC) -o $@ $(OBJ_OFFSETS) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ_OFFSETS) $(LDLIBS)
lasts: $(OBJ_LASTS)
- $(CC) -o $@ $(OBJ_LASTS) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ_LASTS) $(LDLIBS)
multicat_validate: $(OBJ_MULTICAT_VALIDATE)
- $(CC) -o $@ $(OBJ_MULTICAT_VALIDATE) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ_MULTICAT_VALIDATE) $(LDLIBS)
multilive: $(OBJ_MULTILIVE)
- $(CC) -o $@ $(OBJ_MULTILIVE) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ_MULTILIVE) $(LDLIBS)
clean:
-rm -f multicat $(OBJ_MULTICAT) ingests $(OBJ_INGESTS) aggregartp $(OBJ_AGGREGARTP) reordertp $(OBJ_REORDERTP) offsets $(OBJ_OFFSETS) lasts $(OBJ_LASTS) multicat_validate $(OBJ_MULTICAT_VALIDATE) multilive $(OBJ_MULTILIVE)
=====================================
multicat.c
=====================================
--- a/multicat.c
+++ b/multicat.c
@@ -1,7 +1,7 @@
/*****************************************************************************
* multicat.c: netcat-equivalent for multicast
*****************************************************************************
- * Copyright (C) 2009, 2011-2012, 2015-2016 VideoLAN
+ * Copyright (C) 2009, 2011-2012, 2015-2017 VideoLAN
* $Id$
*
* Authors: Christophe Massiot <massiot at via.ecp.fr>
@@ -43,10 +43,7 @@
#include <poll.h>
#include <sys/ioctl.h>
#include <syslog.h>
-
-#ifdef __FreeBSD__
-# include <sys/uio.h>
-#endif
+#include <sys/uio.h>
#ifdef SIOCGSTAMPNS
# define HAVE_TIMESTAMPS
=====================================
util.h
=====================================
--- a/util.h
+++ b/util.h
@@ -1,7 +1,7 @@
/*****************************************************************************
* util.h: Utils for the multicat suite
*****************************************************************************
- * Copyright (C) 2009, 2011, 2014-2016 VideoLAN
+ * Copyright (C) 2009, 2011, 2014-2017 VideoLAN
* $Id$
*
* Authors: Christophe Massiot <massiot at via.ecp.fr>
@@ -23,6 +23,7 @@
#include <netinet/udp.h>
#include <netinet/ip.h>
+#include <sys/types.h>
#if defined(__APPLE__) || defined(__FreeBSD__)
#define POLLRDHUP 0
@@ -59,14 +60,12 @@ typedef union
* Raw udp packet structure with flexible-array payload
*****************************************************************************/
struct udprawpkt {
-#if !defined(__APPLE__)
-#if defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
struct ip iph;
#else
struct iphdr iph;
#endif
struct udphdr udph;
-#endif
uint8_t payload[];
} __attribute__((packed));
View it on GitLab: https://code.videolan.org/videolan/multicat/compare/105d45fa60375c92e7b0253538db8ac297188d11...f7919edfe7bb581dfd32f6937a75f3cd43343d8f
---
View it on GitLab: https://code.videolan.org/videolan/multicat/compare/105d45fa60375c92e7b0253538db8ac297188d11...f7919edfe7bb581dfd32f6937a75f3cd43343d8f
You're receiving this email because of your account on code.videolan.org.
More information about the multicat-devel
mailing list