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

Linux doesn't support strlcpy #12

Closed
yeled opened this issue Feb 22, 2015 · 1 comment
Closed

Linux doesn't support strlcpy #12

yeled opened this issue Feb 22, 2015 · 1 comment

Comments

@yeled
Copy link

yeled commented Feb 22, 2015

as reported by @job this is broken since adding d787382 - in particular strlcpy, which is a Theoism. Should libbsd be included for linux distributions or the more risky strncpy?

4:18 netmon1-r10-sfo2:~/bgpq3% make
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -c bgpq3.c
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -c sx_report.c
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -c bgpq_expander.c
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -c sx_slentry.c
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -c bgpq3_printer.c
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -c sx_prefix.c
sx_prefix.c: In function ‘sx_prefix_parse’:
sx_prefix.c:56:2: warning: implicit declaration of function ‘strlcpy’ [-Wimplicit-function-declaration]
  strlcpy(mtext, text, sizeof(mtext));
  ^
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -c strlcpy.c
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -c sx_maxsockbuf.c
gcc -std=gnu99 -DHAVE_CONFIG_H -g -Wall -I. -O0 -o bgpq3 bgpq3.o sx_report.o bgpq_expander.o sx_slentry.o bgpq3_printer.o sx_prefix.o strlcpy.o sx_maxsockbuf.o -lnsl
4:18 netmon1-r10-sfo2:~/bgpq3%
@snar
Copy link
Owner

snar commented Feb 24, 2015

strlcpy is already included in bgpq3, missing declaration added to sx_prefix.h.
Thanks for reporting.

@snar snar closed this as completed Feb 24, 2015
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