From f356c4f7de7f971afe9372d0373c9b883d70fedb Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 3 Jan 2011 17:10:36 -0600 Subject: [PATCH] dvb: fix build errors on macosx fixes the following compile errors: cc1: warnings being treated as errors camswclient.c: In function 'cam_sw_client_open': camswclient.c:81: warning: implicit declaration of function 'strncpy' camswclient.c:81: warning: incompatible implicit declaration of built-in function 'strncpy' camswclient.c:89: warning: implicit declaration of function 'strerror' camswclient.c:89: warning: nested extern declaration of 'strerror' camswclient.c:89: warning: format '%s' expects type 'char *', but argument 9 has type 'int' camswclient.c: In function 'send_ca_pmt': camswclient.c:129: warning: implicit declaration of function 'memcpy' camswclient.c:129: warning: incompatible implicit declaration of built-in function 'memcpy' gstdvbsrc.c:48:19: error: error.h: No such file or directory Signed-off-by: Rob Clark --- sys/dvb/camswclient.c | 4 +++- sys/dvb/gstdvbsrc.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dvb/camswclient.c b/sys/dvb/camswclient.c index b68b0a7b84..98781f3a96 100644 --- a/sys/dvb/camswclient.c +++ b/sys/dvb/camswclient.c @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include @@ -78,7 +80,7 @@ cam_sw_client_open (CamSwClient * client, const char *sock_path) g_return_val_if_fail (sock_path != NULL, FALSE); addr.sun_family = AF_UNIX; - strncpy (addr.sun_path, sock_path, UNIX_PATH_MAX); + strncpy (addr.sun_path, sock_path, sizeof (addr.sun_path)); GST_INFO ("connecting to softcam socket: %s", sock_path); client->sock = socket (PF_UNIX, SOCK_STREAM, 0); diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index bce25f69b6..a136027d4e 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include