Skip to content
Snippets Groups Projects
Commit b70b117e authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Rename some symbols to please an older version of bison.

MacOS provides an older version of bison which results in
macro redifinitions for CMSG_LEN and CMSG_DATA. Renaming
them resolves this.
parent d8d2715f
No related branches found
No related tags found
No related merge requests found
...@@ -289,10 +289,10 @@ msg_name return MSG_NAME; ...@@ -289,10 +289,10 @@ msg_name return MSG_NAME;
msg_iov return MSG_IOV; msg_iov return MSG_IOV;
msg_control return MSG_CONTROL; msg_control return MSG_CONTROL;
msg_flags return MSG_FLAGS; msg_flags return MSG_FLAGS;
cmsg_len return CMSG_LEN; cmsg_len return _CMSG_LEN_;
cmsg_level return CMSG_LEVEL; cmsg_level return CMSG_LEVEL;
cmsg_type return CMSG_TYPE; cmsg_type return CMSG_TYPE;
cmsg_data return CMSG_DATA; cmsg_data return _CMSG_DATA_;
fd return FD; fd return FD;
events return EVENTS; events return EVENTS;
revents return REVENTS; revents return REVENTS;
......
...@@ -559,7 +559,7 @@ static struct tcp_option *new_tcp_exp_fast_open_option(const char *cookie_string ...@@ -559,7 +559,7 @@ static struct tcp_option *new_tcp_exp_fast_open_option(const char *cookie_string
*/ */
%token ELLIPSIS %token ELLIPSIS
%token <reserved> SA_FAMILY SIN_PORT SIN_ADDR _HTONS_ _HTONL_ INET_ADDR %token <reserved> SA_FAMILY SIN_PORT SIN_ADDR _HTONS_ _HTONL_ INET_ADDR
%token <reserved> MSG_NAME MSG_IOV MSG_FLAGS MSG_CONTROL CMSG_LEN CMSG_LEVEL CMSG_TYPE CMSG_DATA %token <reserved> MSG_NAME MSG_IOV MSG_FLAGS MSG_CONTROL _CMSG_LEN_ CMSG_LEVEL CMSG_TYPE _CMSG_DATA_
%token <reserved> SF_HDTR_HEADERS SF_HDTR_TRAILERS %token <reserved> SF_HDTR_HEADERS SF_HDTR_TRAILERS
%token <reserved> FD EVENTS REVENTS ONOFF LINGER %token <reserved> FD EVENTS REVENTS ONOFF LINGER
%token <reserved> ACK ECR EOL MSS NOP SACK NR_SACK SACKOK TIMESTAMP VAL WIN WSCALE PRO %token <reserved> ACK ECR EOL MSS NOP SACK NR_SACK SACKOK TIMESTAMP VAL WIN WSCALE PRO
...@@ -3188,19 +3188,19 @@ cmsg_type ...@@ -3188,19 +3188,19 @@ cmsg_type
; ;
cmsg_data cmsg_data
: CMSG_DATA '=' sctp_initmsg { $$ = $3; } : _CMSG_DATA_ '=' sctp_initmsg { $$ = $3; }
| CMSG_DATA '=' sctp_sndrcvinfo { $$ = $3; } | _CMSG_DATA_ '=' sctp_sndrcvinfo { $$ = $3; }
| CMSG_DATA '=' sctp_extrcvinfo { $$ = $3; } | _CMSG_DATA_ '=' sctp_extrcvinfo { $$ = $3; }
| CMSG_DATA '=' sctp_sndinfo { $$ = $3; } | _CMSG_DATA_ '=' sctp_sndinfo { $$ = $3; }
| CMSG_DATA '=' sctp_rcvinfo { $$ = $3; } | _CMSG_DATA_ '=' sctp_rcvinfo { $$ = $3; }
| CMSG_DATA '=' sctp_nxtinfo { $$ = $3; } | _CMSG_DATA_ '=' sctp_nxtinfo { $$ = $3; }
| CMSG_DATA '=' sctp_prinfo { $$ = $3; } | _CMSG_DATA_ '=' sctp_prinfo { $$ = $3; }
| CMSG_DATA '=' sctp_authinfo { $$ = $3; } | _CMSG_DATA_ '=' sctp_authinfo { $$ = $3; }
| CMSG_DATA '=' sockaddr { $$ = $3; } | _CMSG_DATA_ '=' sockaddr { $$ = $3; }
; ;
cmsghdr cmsghdr
: '{' CMSG_LEN '=' INTEGER ',' cmsg_level ',' cmsg_type ',' cmsg_data '}' { : '{' _CMSG_LEN_ '=' INTEGER ',' cmsg_level ',' cmsg_type ',' cmsg_data '}' {
$$ = new_expression(EXPR_CMSGHDR); $$ = new_expression(EXPR_CMSGHDR);
$$->value.cmsghdr = calloc(1, sizeof(struct cmsghdr_expr)); $$->value.cmsghdr = calloc(1, sizeof(struct cmsghdr_expr));
if (!is_valid_s32($4)) { if (!is_valid_s32($4)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment