Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socklen_t typedef conflict #90

Closed
rna88 opened this issue Mar 9, 2018 · 1 comment
Closed

socklen_t typedef conflict #90

rna88 opened this issue Mar 9, 2018 · 1 comment

Comments

@rna88
Copy link

rna88 commented Mar 9, 2018

When including the enet headers to build a project on Linux 4.13.12-1-ARCH x86_64 with gcc version 7.3.0, there is a typedef conflict with my system headers:

enet/unix.c:58:13: error: conflicting types for ‘socklen_t’
 typedef int socklen_t;
             ^~~~~~~~~
In file included from /usr/include/sys/socket.h:33:0,
                 from enet/unix.c:8:
/usr/include/bits/socket.h:33:21: note: previous declaration of ‘socklen_t’ was here
 typedef __socklen_t socklen_t;
                     ^~~~~~~~~
make: *** [<builtin>: enet/unix.o] Error 1

I added another define statement in unix.c line 58 to get around this for now:

#ifndef HAS_SOCKLEN_T
  #ifndef __socklen_t_defined
    typedef int socklen_t;
  #endif
#endif
Ablu pushed a commit to mana/manaserv that referenced this issue Apr 5, 2018
It is reported as lsalzman/enet#90 but unfixed
in upstream so far...
jakrams pushed a commit to jakrams/enet that referenced this issue Mar 16, 2021
jakrams pushed a commit to jakrams/enet that referenced this issue Mar 16, 2021
@lsalzman
Copy link
Owner

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants