Skip to content
Commit 9616ade2 authored by Markus Mayer's avatar Markus Mayer Committed by Arnout Vandecappelle (Essensium/Mind)
Browse files

package/mkpasswd: define _DEFAULT_SOURCE to suppress compiler warning

We define _DEFAULT_SOURCE in mkpasswd.c to suppress a compiler warning.

In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from [...]/buildroot/output/arm64/build/host-mkpasswd/mkpasswd.c:24:
/usr/include/features.h:187:3:
  187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~

As per GLIBC 2.20 release notes[1]:

    The _BSD_SOURCE and _SVID_SOURCE feature test macros are no longer
    supported; they now act the same as _DEFAULT_SOURCE (but generate a
    warning). Except for cases where _BSD_SOURCE enabled BSD interfaces
    that conflicted with POSIX (support for which was removed in 2.19),
    the interfaces those macros enabled remain available when compiling
    with _GNU_SOURCE defined, with _DEFAULT_SOURCE defined, or without
    any feature test macros defined.

[1] https://lwn.net/Articles/611162/



Signed-off-by: default avatarMarkus Mayer <mmayer@broadcom.com>
Signed-off-by: default avatarArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
parent d35a0936
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment