dante: fix compilation with GCC14
Also added some configure fixes. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
1016f8f1ba
commit
725c3d687f
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=dante
|
||||
PKG_VERSION:=1.4.3
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.inet.no/dante/files/
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
--- a/include/osdep.h
|
||||
+++ b/include/osdep.h
|
||||
@@ -218,6 +218,7 @@
|
||||
#endif /* HAVE_STDDEF_H */
|
||||
|
||||
#if HAVE_PTHREAD_H
|
||||
+#define _GNU_SOURCE
|
||||
#include <pthread.h>
|
||||
#endif /* HAVE_PTHREAD_H */
|
||||
|
||||
--- a/lib/Rbindresvport.c
|
||||
+++ b/lib/Rbindresvport.c
|
||||
@@ -72,11 +72,11 @@ Rbindresvport(s, _sin)
|
||||
|
||||
if (_sin == NULL) {
|
||||
slog(LOG_DEBUG, "%s: fd %d, _sin = %p", function, s, _sin);
|
||||
- return bindresvport(s, _sin);
|
||||
+ return Rbindresvport(s, _sin);
|
||||
}
|
||||
|
||||
usrsockaddrcpy(&sin, TOSS(_sin), sizeof(*_sin));
|
||||
- if (bindresvport(s, TOIN(&sin)) != 0) {
|
||||
+ if (Rbindresvport(s, TOIN(&sin)) != 0) {
|
||||
slog(LOG_DEBUG, "%s: bindresvport(%d, %s) failed: %s",
|
||||
function,
|
||||
s,
|
||||
--- a/lib/Rconnect.c
|
||||
+++ b/lib/Rconnect.c
|
||||
@@ -433,7 +433,7 @@ Rconnect(s, _name, namelen)
|
||||
TOIN(&socksfd.local)->sin_port = htons(0);
|
||||
|
||||
/* LINTED pointer casts may be troublesome */
|
||||
- bindresvport(s, TOIN(&socksfd.local));
|
||||
+ Rbindresvport(s, TOIN(&socksfd.local));
|
||||
}
|
||||
|
||||
return Rconnect(s, TOSA(&name), namelen);
|
||||
--- a/libscompat.m4
|
||||
+++ b/libscompat.m4
|
||||
@@ -34,6 +34,7 @@ AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
#ifndef SIOCGIFHWADDR
|
||||
@@ -103,6 +104,7 @@ AC_CHECK_FUNC(getpassphrase,
|
||||
|
||||
AC_MSG_CHECKING([for sched_setaffinity])
|
||||
AC_TRY_COMPILE([
|
||||
+#define _GNU_SOURCE
|
||||
#include <sched.h>
|
||||
],
|
||||
[ cpu_set_t set1;
|
Loading…
Reference in New Issue