Skip to content
Snippets Groups Projects

Fix compilation on AIX 7.3

Closed Martin Guy requested to merge martinwguy/opusfile:ip_len into master
  1. Sep 15, 2024
  2. Sep 14, 2024
    • Martin Guy's avatar
      Fix compilation on AIX 7.3 · e42919a2
      Martin Guy authored
      On AIX, compilation fails saying
      
          src/http.c: In function 'op_http_conn_start_tls':
          src/http.c:1944:5: warning: ISO C forbids nested functions [-Wpedantic]
           1944 |     int                ip_len;
      	  |     ^~~
          In file included from /usr/include/netinet/tcp.h:115,
      		     from src/http.c:345:
          src/http.c:1944:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
           1944 |     int                ip_len;
          src/http.c:1944:24: error: expected expression before '.' token
          src/http.c:1949:5: error: 'ip_ff' undeclared (first use in this function); did you mean 'ip_fv'?
           1949 |     ip_len=0;
      
      because `/usr/include/netinet/ip-h` contains
      
          #define  ip_len  ip_ff.ip_flen
      
      The obvious solution os to rename the int variable to something else.
      e42919a2
Loading