View | Details | Raw Unified | Return to bug 42848
Collapse All | Expand All

(-)network_io/unix/sockopt.c (+11 lines)
Lines 17-22 Link Here
17
#include "apr_arch_networkio.h"
17
#include "apr_arch_networkio.h"
18
#include "apr_strings.h"
18
#include "apr_strings.h"
19
19
20
#if !defined(SOL_IP)
21
#define SOL_IP IPPROTO_IP
22
#endif
20
23
21
static apr_status_t soblock(int sd)
24
static apr_status_t soblock(int sd)
22
{
25
{
Lines 330-335 Link Here
330
        return APR_ENOTIMPL;
333
        return APR_ENOTIMPL;
331
#endif
334
#endif
332
        break;
335
        break;
336
    case APR_SO_IPTOS:
337
#if defined(IP_TOS)
338
	if (setsockopt(sock->socketdes, SOL_IP, IP_TOS, (void *)&on, sizeof(int)) == -1) {
339
	    return errno;
340
	}
341
#else
342
	return APR_ENOTIMPL;
343
#endif
333
    default:
344
    default:
334
        return APR_EINVAL;
345
        return APR_EINVAL;
335
    }
346
    }
(-)include/apr.h.in (+2 lines)
Lines 82-89 Link Here
82
#define APR_HAVE_MSWSOCK_H       @mswsockh@
82
#define APR_HAVE_MSWSOCK_H       @mswsockh@
83
#define APR_HAVE_NETDB_H         @netdbh@
83
#define APR_HAVE_NETDB_H         @netdbh@
84
#define APR_HAVE_NETINET_IN_H    @netinet_inh@
84
#define APR_HAVE_NETINET_IN_H    @netinet_inh@
85
#define APR_HAVE_NETINET_IN_SYSTM_H @netinet_in_systmh@
85
#define APR_HAVE_NETINET_SCTP_H  @netinet_sctph@
86
#define APR_HAVE_NETINET_SCTP_H  @netinet_sctph@
86
#define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@
87
#define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@
88
#define APR_HAVE_NETINET_IP_H    @netinet_iph@
87
#define APR_HAVE_NETINET_TCP_H   @netinet_tcph@
89
#define APR_HAVE_NETINET_TCP_H   @netinet_tcph@
88
#define APR_HAVE_PROCESS_H       @processh@
90
#define APR_HAVE_PROCESS_H       @processh@
89
#define APR_HAVE_PTHREAD_H       @pthreadh@
91
#define APR_HAVE_PTHREAD_H       @pthreadh@
(-)include/apr.hw (+2 lines)
Lines 128-135 Link Here
128
#define APR_HAVE_MSWSOCK_H       APR_NOT_IN_WCE
128
#define APR_HAVE_MSWSOCK_H       APR_NOT_IN_WCE
129
#define APR_HAVE_NETDB_H        0
129
#define APR_HAVE_NETDB_H        0
130
#define APR_HAVE_NETINET_IN_H   0
130
#define APR_HAVE_NETINET_IN_H   0
131
#define APR_HAVE_NETINET_IN_SYSTM_H 0
131
#define APR_HAVE_NETINET_SCTP_H 0
132
#define APR_HAVE_NETINET_SCTP_H 0
132
#define APR_HAVE_NETINET_SCTP_UIO_H 0
133
#define APR_HAVE_NETINET_SCTP_UIO_H 0
134
#define APR_HAVE_NETINET_IP_H   0
133
#define APR_HAVE_NETINET_TCP_H  0
135
#define APR_HAVE_NETINET_TCP_H  0
134
#define APR_HAVE_PROCESS_H      1
136
#define APR_HAVE_PROCESS_H      1
135
#define APR_HAVE_PTHREAD_H      0
137
#define APR_HAVE_PTHREAD_H      0
(-)include/arch/unix/apr_arch_networkio.h (+6 lines)
Lines 52-57 Link Here
52
#if APR_HAVE_NETINET_TCP_H
52
#if APR_HAVE_NETINET_TCP_H
53
#include <netinet/tcp.h>
53
#include <netinet/tcp.h>
54
#endif
54
#endif
55
#if APR_HAVE_NETINET_IN_SYSTM_H
56
#include <netinet/in_systm.h>
57
#endif
58
#if APR_HAVE_NETINET_IP_H
59
#include <netinet/ip.h>
60
#endif
55
#if APR_HAVE_NETINET_SCTP_UIO_H
61
#if APR_HAVE_NETINET_SCTP_UIO_H
56
#include <netinet/sctp_uio.h>
62
#include <netinet/sctp_uio.h>
57
#endif
63
#endif
(-)include/apr_network_io.h (+1 lines)
Lines 105-110 Link Here
105
                                    */
105
                                    */
106
#define APR_SO_BROADCAST     65536 /**< Allow broadcast
106
#define APR_SO_BROADCAST     65536 /**< Allow broadcast
107
                                    */
107
                                    */
108
#define APR_SO_IPTOS        131072 /**< Set IP ToS markings on traffic. */
108
109
109
/** @} */
110
/** @} */
110
111
(-)include/apr.hnw (+3 lines)
Lines 92-104 Link Here
92
#define APR_HAVE_ARPA_INET_H            0
92
#define APR_HAVE_ARPA_INET_H            0
93
#define APR_HAVE_NETDB_H                0
93
#define APR_HAVE_NETDB_H                0
94
#define APR_HAVE_NETINET_IN_H           0
94
#define APR_HAVE_NETINET_IN_H           0
95
#define APR_HAVE_NETINET_IN_SYSTM_H     0
95
#else
96
#else
96
#define APR_HAVE_ARPA_INET_H            1
97
#define APR_HAVE_ARPA_INET_H            1
97
#define APR_HAVE_NETDB_H                1
98
#define APR_HAVE_NETDB_H                1
98
#define APR_HAVE_NETINET_IN_H           1
99
#define APR_HAVE_NETINET_IN_H           1
100
#define APR_HAVE_NETINET_IN_SYSTM_H     1
99
#endif
101
#endif
100
#define APR_HAVE_NETINET_SCTP_H         0
102
#define APR_HAVE_NETINET_SCTP_H         0
101
#define APR_HAVE_NETINET_SCTP_UIO_H     0
103
#define APR_HAVE_NETINET_SCTP_UIO_H     0
104
#define APR_HAVE_NETINET_IP_H           0
102
#define APR_HAVE_NETINET_TCP_H          0
105
#define APR_HAVE_NETINET_TCP_H          0
103
#define APR_HAVE_PTHREAD_H              0
106
#define APR_HAVE_PTHREAD_H              0
104
#define APR_HAVE_SIGNAL_H               1
107
#define APR_HAVE_SIGNAL_H               1
(-)configure.in (+24 lines)
Lines 1316-1321 Link Here
1316
    kernel/OS.h		\
1316
    kernel/OS.h		\
1317
    net/errno.h		\
1317
    net/errno.h		\
1318
    netinet/in.h	\
1318
    netinet/in.h	\
1319
    netinet/in_systm.h	\
1319
    netinet/sctp.h      \
1320
    netinet/sctp.h      \
1320
    netinet/sctp_uio.h  \
1321
    netinet/sctp_uio.h  \
1321
    sys/file.h		\
1322
    sys/file.h		\
Lines 1368-1373 Link Here
1368
   netinet_tcph=0
1369
   netinet_tcph=0
1369
fi
1370
fi
1370
1371
1372
# Debian has a similiar problem with <netinet/ip.h> wihich prevents it
1373
# from being included by itself.  Check for <netinet/ip.h> manually,
1374
# including another header file first.
1375
AC_CACHE_CHECK([for netinet/ip.h], [apr_cv_hdr_netinet_ip_h],
1376
[AC_TRY_CPP(
1377
[#ifdef HAVE_NETINET_IN_H
1378
#include <netinet/in.h>
1379
#endif
1380
#ifdef HAVE_NETINET_IN_SYSTM_H
1381
#include <netinet/in_systm.h>
1382
#endif
1383
#include <netinet/ip.h>
1384
], [apr_cv_hdr_netinet_ip_h=yes], [apr_cv_hdr_netinet_ip_h=no])])
1385
cat conftest.c >> /dev/tty
1386
if test "$apr_cv_hdr_netinet_ip_h" = "yes"; then
1387
   netinet_iph=1
1388
   AC_DEFINE([HAVE_NETINET_IP_H], 1, [Defined if netinet/ip.h is present])
1389
else
1390
   netinet_iph=0
1391
fi
1392
1371
AC_SUBST(arpa_ineth)
1393
AC_SUBST(arpa_ineth)
1372
AC_SUBST(conioh)
1394
AC_SUBST(conioh)
1373
AC_SUBST(ctypeh)
1395
AC_SUBST(ctypeh)
Lines 1381-1386 Link Here
1381
AC_SUBST(mswsockh)
1403
AC_SUBST(mswsockh)
1382
AC_SUBST(netdbh)
1404
AC_SUBST(netdbh)
1383
AC_SUBST(netinet_inh)
1405
AC_SUBST(netinet_inh)
1406
AC_SUBST(netinet_in_systmh)
1407
AC_SUBST(netinet_iph)
1384
AC_SUBST(netinet_sctph)
1408
AC_SUBST(netinet_sctph)
1385
AC_SUBST(netinet_sctp_uioh)
1409
AC_SUBST(netinet_sctp_uioh)
1386
AC_SUBST(netinet_tcph)
1410
AC_SUBST(netinet_tcph)
(-)build/aprenv.py (+2 lines)
Lines 225-231 Link Here
225
    kernel/OS.h
225
    kernel/OS.h
226
    net/errno.h
226
    net/errno.h
227
    netinet/in.h
227
    netinet/in.h
228
    netinet/in_systm.h
228
    netinet/sctp.h
229
    netinet/sctp.h
230
    netinet/ip.h
229
    netinet/tcp.h
231
    netinet/tcp.h
230
    netinet/sctp_uio.h
232
    netinet/sctp_uio.h
231
    sys/file.h
233
    sys/file.h

Return to bug 42848