From: Vincent Bernat Date: Fri, 28 Dec 2012 16:57:07 +0000 (+0100) Subject: priv: open special call is only needed for Linux X-Git-Tag: 0.7.0~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=70c9cb05ff145135737cf394de81f80191599d9c;p=thirdparty%2Flldpd.git priv: open special call is only needed for Linux --- diff --git a/src/daemon/lldpd.h b/src/daemon/lldpd.h index 1a042623..ea96dcf1 100644 --- a/src/daemon/lldpd.h +++ b/src/daemon/lldpd.h @@ -196,8 +196,8 @@ client_handle_client(struct lldpd *cfg, void priv_init(char*, int, uid_t, gid_t); void priv_ctl_cleanup(void); char *priv_gethostbyname(void); -int priv_open(char*); #ifdef HOST_OS_LINUX +int priv_open(char*); int priv_ethtool(char*, void*, size_t); #endif int priv_iface_init(int); diff --git a/src/daemon/priv.c b/src/daemon/priv.c index 73608aa3..7753b94a 100644 --- a/src/daemon/priv.c +++ b/src/daemon/priv.c @@ -115,6 +115,7 @@ priv_gethostbyname() return buf; } +#ifdef HOST_OS_LINUX /* Proxy for open */ int priv_open(char *file) @@ -130,6 +131,7 @@ priv_open(char *file) return rc; return receive_fd(remote); } +#endif #ifdef HOST_OS_LINUX /* Proxy for ethtool ioctl */ @@ -226,6 +228,7 @@ asroot_gethostbyname() } } +#ifdef HOST_OS_LINUX static void asroot_open() { @@ -283,6 +286,7 @@ asroot_open() send_fd(remote, fd); close(fd); } +#endif #ifdef HOST_OS_LINUX #include @@ -456,8 +460,8 @@ static struct dispatch_actions actions[] = { {PRIV_PING, asroot_ping}, {PRIV_DELETE_CTL_SOCKET, asroot_ctl_cleanup}, {PRIV_GET_HOSTNAME, asroot_gethostbyname}, - {PRIV_OPEN, asroot_open}, #ifdef HOST_OS_LINUX + {PRIV_OPEN, asroot_open}, {PRIV_ETHTOOL, asroot_ethtool}, #endif {PRIV_IFACE_INIT, asroot_iface_init},