Make sure the definition of IPPORT_USERRESERVED is defined

caProto.h was using IPPORT_USERRESERVED but not including itself,
meaning there was an order dependency of header inclusion when using
this header.  Now there shouldn't be.

Also, RTEMS wasn't defining IPPORT_USERRESERVED, so that definition
has been added.
This commit is contained in:
Brendan Chandler
2021-02-05 10:42:02 -06:00
parent 8d7c98aac4
commit cd0e6a4f9a
2 changed files with 7 additions and 0 deletions

View File

@@ -17,6 +17,9 @@
#ifndef INC_caProto_H
#define INC_caProto_H
// Pick up definition of IPPORT_USERRESERVED
#include <osdSock.h>
#define capStrOf(A) #A
#define capStrOfX(A) capStrOf ( A )

View File

@@ -37,6 +37,10 @@ int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, str
}
#endif
#ifndef IPPORT_USERRESERVED
#define IPPORT_USERRESERVED 5000
#endif
typedef int SOCKET;
#define INVALID_SOCKET (-1)
#define SOCKERRNO errno