mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 04:09:26 +08:00
Fix errno conflict
Newlib defines errno as #define errno (*__errno()) In case this is expanded in a function parameter, e.g. void f(int errno) { ... } then we have a function pointer parameter instead of the integer scalar.
This commit is contained in:
parent
2208c4036d
commit
11b7f58408
@ -33,6 +33,10 @@
|
|||||||
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
|
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __rtems__
|
||||||
|
#include <errno.h>
|
||||||
|
#undef errno
|
||||||
|
#endif /* __rtems__ */
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp,
|
|||||||
/*
|
/*
|
||||||
* Flags for inp_flags2.
|
* Flags for inp_flags2.
|
||||||
*/
|
*/
|
||||||
#define INP_LLE_VALID 0x00000001 /* cached lle is valid */
|
#define INP_LLE_VALID 0x00000001 /* cached lle is valid */
|
||||||
#define INP_RT_VALID 0x00000002 /* cached rtentry is valid */
|
#define INP_RT_VALID 0x00000002 /* cached rtentry is valid */
|
||||||
|
|
||||||
#define INPLOOKUP_WILDCARD 1
|
#define INPLOOKUP_WILDCARD 1
|
||||||
@ -503,13 +503,8 @@ struct inpcb *
|
|||||||
struct inpcb *
|
struct inpcb *
|
||||||
in_pcblookup_hash(struct inpcbinfo *, struct in_addr, u_int,
|
in_pcblookup_hash(struct inpcbinfo *, struct in_addr, u_int,
|
||||||
struct in_addr, u_int, int, struct ifnet *);
|
struct in_addr, u_int, int, struct ifnet *);
|
||||||
#ifndef __rtems__
|
void in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr,
|
||||||
void in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr,
|
int, struct inpcb *(*)(struct inpcb *, int));
|
||||||
int, struct inpcb *(*)(struct inpcb *, int));
|
|
||||||
#else
|
|
||||||
void in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr faddr, int errno,
|
|
||||||
struct inpcb *(*notify)(struct inpcb *, int));
|
|
||||||
#endif
|
|
||||||
void in_pcbref(struct inpcb *);
|
void in_pcbref(struct inpcb *);
|
||||||
void in_pcbrehash(struct inpcb *);
|
void in_pcbrehash(struct inpcb *);
|
||||||
int in_pcbrele(struct inpcb *);
|
int in_pcbrele(struct inpcb *);
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
* @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
|
* @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __rtems__
|
||||||
|
#include <errno.h>
|
||||||
|
#undef errno
|
||||||
|
#endif /* __rtems__ */
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ struct tcpstat {
|
|||||||
u_long tcps_sack_rcv_blocks; /* SACK blocks (options) received */
|
u_long tcps_sack_rcv_blocks; /* SACK blocks (options) received */
|
||||||
u_long tcps_sack_send_blocks; /* SACK blocks (options) sent */
|
u_long tcps_sack_send_blocks; /* SACK blocks (options) sent */
|
||||||
u_long tcps_sack_sboverflow; /* times scoreboard overflowed */
|
u_long tcps_sack_sboverflow; /* times scoreboard overflowed */
|
||||||
|
|
||||||
/* ECN related stats */
|
/* ECN related stats */
|
||||||
u_long tcps_ecn_ce; /* ECN Congestion Experienced */
|
u_long tcps_ecn_ce; /* ECN Congestion Experienced */
|
||||||
u_long tcps_ecn_ect0; /* ECN Capable Transport */
|
u_long tcps_ecn_ect0; /* ECN Capable Transport */
|
||||||
@ -590,13 +590,8 @@ int tcp_twrecycleable(struct tcptw *tw);
|
|||||||
void tcp_twclose(struct tcptw *_tw, int _reuse);
|
void tcp_twclose(struct tcptw *_tw, int _reuse);
|
||||||
void tcp_ctlinput(int, struct sockaddr *, void *);
|
void tcp_ctlinput(int, struct sockaddr *, void *);
|
||||||
int tcp_ctloutput(struct socket *, struct sockopt *);
|
int tcp_ctloutput(struct socket *, struct sockopt *);
|
||||||
#ifndef __rtems__
|
|
||||||
struct tcpcb *
|
struct tcpcb *
|
||||||
tcp_drop(struct tcpcb *, int);
|
tcp_drop(struct tcpcb *, int);
|
||||||
#else
|
|
||||||
struct tcpcb *
|
|
||||||
tcp_drop(struct tcpcb *tp, int errno);
|
|
||||||
#endif
|
|
||||||
void tcp_drain(void);
|
void tcp_drain(void);
|
||||||
void tcp_init(void);
|
void tcp_init(void);
|
||||||
#ifdef VIMAGE
|
#ifdef VIMAGE
|
||||||
@ -619,17 +614,10 @@ u_long tcp_maxmtu6(struct in_conninfo *, int *);
|
|||||||
void tcp_mss_update(struct tcpcb *, int, struct hc_metrics_lite *, int *);
|
void tcp_mss_update(struct tcpcb *, int, struct hc_metrics_lite *, int *);
|
||||||
void tcp_mss(struct tcpcb *, int);
|
void tcp_mss(struct tcpcb *, int);
|
||||||
int tcp_mssopt(struct in_conninfo *);
|
int tcp_mssopt(struct in_conninfo *);
|
||||||
#ifndef __rtems__
|
|
||||||
struct inpcb *
|
struct inpcb *
|
||||||
tcp_drop_syn_sent(struct inpcb *, int);
|
tcp_drop_syn_sent(struct inpcb *, int);
|
||||||
struct inpcb *
|
struct inpcb *
|
||||||
tcp_mtudisc(struct inpcb *, int);
|
tcp_mtudisc(struct inpcb *, int);
|
||||||
#else
|
|
||||||
struct inpcb *
|
|
||||||
tcp_drop_syn_sent(struct inpcb *inp, int errno);
|
|
||||||
struct inpcb *
|
|
||||||
tcp_mtudisc(struct inpcb *inp, int errno);
|
|
||||||
#endif
|
|
||||||
struct tcpcb *
|
struct tcpcb *
|
||||||
tcp_newtcpcb(struct inpcb *);
|
tcp_newtcpcb(struct inpcb *);
|
||||||
int tcp_output(struct tcpcb *);
|
int tcp_output(struct tcpcb *);
|
||||||
|
@ -33,6 +33,10 @@
|
|||||||
* @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
|
* @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __rtems__
|
||||||
|
#include <errno.h>
|
||||||
|
#undef errno
|
||||||
|
#endif /* __rtems__ */
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
|
@ -91,6 +91,10 @@ struct udpstat {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
|
#ifdef __rtems__
|
||||||
|
#include <errno.h>
|
||||||
|
#undef errno
|
||||||
|
#endif /* __rtems__ */
|
||||||
/*
|
/*
|
||||||
* In-kernel consumers can use these accessor macros directly to update
|
* In-kernel consumers can use these accessor macros directly to update
|
||||||
* stats.
|
* stats.
|
||||||
|
@ -62,6 +62,10 @@
|
|||||||
* @(#)in_pcb.c 8.2 (Berkeley) 1/4/94
|
* @(#)in_pcb.c 8.2 (Berkeley) 1/4/94
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __rtems__
|
||||||
|
#include <errno.h>
|
||||||
|
#undef errno
|
||||||
|
#endif /* __rtems__ */
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
|
@ -86,13 +86,8 @@ struct inpcb *
|
|||||||
void in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr *,
|
void in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr *,
|
||||||
u_int, const struct sockaddr *, u_int, int, void *,
|
u_int, const struct sockaddr *, u_int, int, void *,
|
||||||
struct inpcb *(*)(struct inpcb *, int)));
|
struct inpcb *(*)(struct inpcb *, int)));
|
||||||
#ifndef __rtems__
|
|
||||||
struct inpcb *
|
struct inpcb *
|
||||||
in6_rtchange __P((struct inpcb *, int));
|
in6_rtchange __P((struct inpcb *, int));
|
||||||
#else
|
|
||||||
struct inpcb *
|
|
||||||
in6_rtchange(struct inpcb *inp, int errno);
|
|
||||||
#endif
|
|
||||||
struct sockaddr *
|
struct sockaddr *
|
||||||
in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p));
|
in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p));
|
||||||
struct sockaddr *
|
struct sockaddr *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user