mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 23:59:18 +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
|
||||
*/
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <errno.h>
|
||||
#undef errno
|
||||
#endif /* __rtems__ */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
@ -503,13 +503,8 @@ struct inpcb *
|
||||
struct inpcb *
|
||||
in_pcblookup_hash(struct inpcbinfo *, struct in_addr, u_int,
|
||||
struct in_addr, u_int, int, struct ifnet *);
|
||||
#ifndef __rtems__
|
||||
void in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr,
|
||||
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_pcbrehash(struct inpcb *);
|
||||
int in_pcbrele(struct inpcb *);
|
||||
|
@ -31,6 +31,10 @@
|
||||
* @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95
|
||||
*/
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <errno.h>
|
||||
#undef errno
|
||||
#endif /* __rtems__ */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
@ -590,13 +590,8 @@ int tcp_twrecycleable(struct tcptw *tw);
|
||||
void tcp_twclose(struct tcptw *_tw, int _reuse);
|
||||
void tcp_ctlinput(int, struct sockaddr *, void *);
|
||||
int tcp_ctloutput(struct socket *, struct sockopt *);
|
||||
#ifndef __rtems__
|
||||
struct tcpcb *
|
||||
tcp_drop(struct tcpcb *, int);
|
||||
#else
|
||||
struct tcpcb *
|
||||
tcp_drop(struct tcpcb *tp, int errno);
|
||||
#endif
|
||||
void tcp_drain(void);
|
||||
void tcp_init(void);
|
||||
#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(struct tcpcb *, int);
|
||||
int tcp_mssopt(struct in_conninfo *);
|
||||
#ifndef __rtems__
|
||||
struct inpcb *
|
||||
tcp_drop_syn_sent(struct inpcb *, int);
|
||||
struct inpcb *
|
||||
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 *
|
||||
tcp_newtcpcb(struct inpcb *);
|
||||
int tcp_output(struct tcpcb *);
|
||||
|
@ -33,6 +33,10 @@
|
||||
* @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
|
||||
*/
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <errno.h>
|
||||
#undef errno
|
||||
#endif /* __rtems__ */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
@ -91,6 +91,10 @@ struct udpstat {
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifdef __rtems__
|
||||
#include <errno.h>
|
||||
#undef errno
|
||||
#endif /* __rtems__ */
|
||||
/*
|
||||
* In-kernel consumers can use these accessor macros directly to update
|
||||
* stats.
|
||||
|
@ -62,6 +62,10 @@
|
||||
* @(#)in_pcb.c 8.2 (Berkeley) 1/4/94
|
||||
*/
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <errno.h>
|
||||
#undef errno
|
||||
#endif /* __rtems__ */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
@ -86,13 +86,8 @@ struct inpcb *
|
||||
void in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr *,
|
||||
u_int, const struct sockaddr *, u_int, int, void *,
|
||||
struct inpcb *(*)(struct inpcb *, int)));
|
||||
#ifndef __rtems__
|
||||
struct inpcb *
|
||||
in6_rtchange __P((struct inpcb *, int));
|
||||
#else
|
||||
struct inpcb *
|
||||
in6_rtchange(struct inpcb *inp, int errno);
|
||||
#endif
|
||||
struct sockaddr *
|
||||
in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p));
|
||||
struct sockaddr *
|
||||
|
Loading…
x
Reference in New Issue
Block a user