I intend to remove gets(3) in the near future and this port failed in the exp-run (PR 222796) http://package18.nyi.freebsd.org/data/112amd64PR222796-default/2018-10-27_20h58m08s/logs/errors/prng-3.0.2.log cc -Wall -fomit-frame-pointer -O2 -pipe -fstack-protector -fno-strict-aliasing -std=gnu89 -fstack-protector -o pairs pairs.o ../src/libprng.a -lm pairs.o: In function `main': pairs.c:(.text+0x45): undefined reference to `gets' pairs.c:(.text+0x98): undefined reference to `gets' pairs.c:(.text+0xc8): undefined reference to `gets' cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop.
Created attachment 205441 [details] Rolls in own function to replace venerable gets() The attached patch should free math/prng from gets. The reason for not using gets_s() is that it is FreeBSD-specific and I'll try to get this patch into the upstream code.
gets_s is actually a C11 optional interface not FreeBSD-specific, but it may indeed not be widely available and using it is probably bad for portability
A commit references this bug: Author: lwhsu Date: Sun Sep 1 16:46:19 UTC 2019 New revision: 510709 URL: https://svnweb.freebsd.org/changeset/ports/510709 Log: Add a patch to remove use of gets(3) PR: 238692 Submitted by: rea Reported by: emaste Sponsored by: The FreeBSD Foundation Changes: head/math/prng/Makefile head/math/prng/files/ head/math/prng/files/patch-no-gets