Re: [PATCH] updwtmp.3: Add #define GNU_SOURCE for updwtmpx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sam!

On 6/24/22 04:59, Sam James wrote:
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216168
Signed-off-by: Sam James <sam@xxxxxxxxxx>

Thanks for the patch!  I applied it.

And yes, glibc uses internally __USE_GNU for when a user is expected to define _GNU_SOURCE.

Cheers,

Alex

See also:


alx@asus5775:/usr/include$ grepc __USE_GNU
./features.h:392:
# define __USE_GNU	1


./regex.h:33:
# define __USE_GNU 1


./x86_64-linux-gnu/ruby-3.0.0/rb_mjit_min_header-3.0.4.h:19554:
#define __USE_GNU 1
alx@asus5775:/usr/include$ grep -rnC1 define.__USE_GNU features.h regex.h
features.h-391-#ifdef	_GNU_SOURCE
features.h:392:# define __USE_GNU	1
features.h-393-#endif
--
regex.h-32-#ifdef _GNU_SOURCE
regex.h:33:# define __USE_GNU 1
regex.h-34-#endif


---
  man3/updwtmp.3 | 1 +
  1 file changed, 1 insertion(+)

diff --git a/man3/updwtmp.3 b/man3/updwtmp.3
index bd84b91cd..175bec772 100644
--- a/man3/updwtmp.3
+++ b/man3/updwtmp.3
@@ -66,6 +66,7 @@ glibc provides (since version 2.1):
  .PP
  .in +4n
  .EX
+.BR "#define _GNU_SOURCE          " "/* See feature_test_macros(7) */"
  .B #include <utmpx.h>
  .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx );
  .EE

--
Alejandro Colomar
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux