Hi Stephen,
On 1/7/22 17:46, Stephen Kitt wrote:
_BSD_SOURCE has been obsolete for long enough that it seems reasonable
to update the example program to use _DEFAULT_SOURCE instead. >
Signed-off-by: Stephen Kitt <steve@xxxxxxx>
Deprecated, yes; obsolete, almost but not yet.
glibc 2.17 is still supported in CentOS 7, IIRC, and _BSD_SOURCE was
deprecated since glibc 2.20 (see feature_test_macros(7)).
However, since this is an example program, which should mainly teach how
to write new code, I'm inclined to use the non-deprecated version.
So, patch applied.
Thanks,
Alex
---
man3/inet.3 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man3/inet.3 b/man3/inet.3
index 657fe45e0..47d3ba160 100644
--- a/man3/inet.3
+++ b/man3/inet.3
@@ -305,7 +305,7 @@ Here are some example runs:
.SS Program source
\&
.EX
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
--
Alejandro Colomar
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/