Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Dave Young <dyoung@redhat.com>
Cc: kexec@lists.infradead.org
Subject: Re: kexec-tools: fix build error with glibc 2.19 and earlier version
Date: Tue, 6 Oct 2015 17:54:07 +0900	[thread overview]
Message-ID: <20151006085407.GA7174@verge.net.au> (raw)
In-Reply-To: <20151003063822.GA9788@localhost.localdomain>

On Sat, Oct 03, 2015 at 02:38:22PM +0800, Dave Young wrote:
> kexec-tools build fails on my laptop with RHEL7.1 installed:
>   gcc -g -O2 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/  -I./kexec/arch/x86_64/include  -c -MD -o kexec/arch/i386/kexec-x86-common.o kexec/arch/i386/kexec-x86-common.c
>   In file included from kexec/arch/i386/kexec-x86-common.c:36:0:
>   kexec/arch/i386/../../kexec.h:19:2: error: #error BYTE_ORDER not defined
>    #error BYTE_ORDER not defined
>     ^
>   kexec/arch/i386/../../kexec.h:23:2: error: #error LITTLE_ENDIAN not defined
>    #error LITTLE_ENDIAN not defined
>     ^
>   kexec/arch/i386/../../kexec.h:27:2: error: #error BIG_ENDIAN not defined
>    #error BIG_ENDIAN not defined
>     ^
>   In file included from kexec/arch/i386/kexec-x86-common.c:37:0:
>   kexec/arch/i386/../../kexec-syscall.h: In function ‘kexec_load’:
>   kexec/arch/i386/../../kexec-syscall.h:74:2: warning: implicit declaration of function ‘syscall’ [-Wimplicit-function-declaration]
>     return (long) syscall(__NR_kexec_load, entry, nr_segments, segments, flags);
>     ^
>   make: *** [kexec/arch/i386/kexec-x86-common.o] Error 1
> 
> The build error was introduced by below commit:
> 
>   commit c9c21cc107dcc9b6053e39ead1069e03717513f9
>   Author: Baoquan He <bhe@redhat.com>
>   Date:   Thu Aug 6 19:10:55 2015 +0800
> 
>       kexec: use _DEFAULT_SOURCE instead to remove compiling warning
> 
>       Now compiling will print warning like below. Change code as it suggested.
>        # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
>          ^
> 
> See manpage: http://man7.org/linux/man-pages/man7/feature_test_macros.7.html
> 
> _BSD_SOURCE has been deprecated since glibc 2.20, To allow code that requires
> _BSD_SOURCE in glibc 2.19 and earlier and _DEFAULT_SOURCE in glibc 2.20 and
> later to compile without warnings, define both _BSD_SOURCE and _DEFAULT_SOURCE.
> 
> Thus fix it by adding back _BSD_SOURCE along with _DEFAULT_SOURCE.
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>

Thanks Dave,

applied.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      reply	other threads:[~2015-10-06  8:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03  6:38 kexec-tools: fix build error with glibc 2.19 and earlier version Dave Young
2015-10-06  8:54 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151006085407.GA7174@verge.net.au \
    --to=horms@verge.net.au \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox