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

edge_utils.c:1687:52: error: ‘SO_REUSEPORT’ undeclared (first use in this function) #51

Closed
basitengr opened this issue Oct 14, 2018 · 2 comments

Comments

@basitengr
Copy link

Hi,
I downloaded git code and compiled on old linode VM machine.

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.8 (wheezy)
Release:        7.8
Codename:       wheezy
# uname -a
Linux asterisk1 4.15.13-x86_64-linode106 #1 SMP Tue Mar 27 14:42:14 UTC 2018 x86_64 GNU/Linux

While compilation i faced following error.

~/n2n# make 
/bin/sh: 1: pkg-config: not found
cc -g3  -Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs   -c n2n.c
cc -g3  -Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs   -c n2n_keyfile.c
cc -g3  -Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs   -c wire.c
cc -g3  -Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs   -c minilzo.c
cc -g3  -Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs   -c twofish.c
cc -g3  -Wall -Wshadow -Wpointer-arith -Wmissing-declarations -Wnested-externs   -c edge_utils.c
edge_utils.c: In function ‘quick_edge_init’:
edge_utils.c:1687:52: error: ‘SO_REUSEPORT’ undeclared (first use in this function)
edge_utils.c:1687:52: note: each undeclared identifier is reported only once for each function it appears in
make: *** [edge_utils.o] Error 1

I am able to compile and run the program by commenting out the lines using ‘SO_REUSEPORT’

~/n2n# grep -r SO_REUSEPORT *
edge.c:  /*  setsockopt(eee.udp_multicast_sock, SOL_SOCKET, SO_REUSEPORT, &enable_reuse, sizeof(enable_reuse)); */
edge_utils.c:  /*  setsockopt(eee.udp_multicast_sock, SOL_SOCKET, SO_REUSEPORT, &enable_reuse, sizeof(enable_reuse)); */

After that make and make install go smoothly.
Can you suggest what the proper resolution?
Is there any limitation in using older kernels?

@cccooo
Copy link

cccooo commented Nov 8, 2018

win32 and linux< 3.9 do not support SO_REUSEPORT.
see: https://stackoverflow.com/a/14388707/986760

@emanuele-f
Copy link
Contributor

Thank you

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

3 participants