From: Wang Nan <[email protected]>
Subject: [PATCH 3/4] makedumpfile: add -D_GNU_SOURCE to CFLAGS
Date: Sat, 26 Apr 2014 12:07:08 +0800

> This patch is preparation for introduce pread/pwrite.
> 

Do you explain more about _GNU_SOURCE? Did you need to define this on
your environment to build makedumpfile with pread/pwrite?

I tried to build a very simple test program using pread like

int main(void)
{
   printf("%p\n", pread);
}

on RHEL5.4, RHEL6.5 and fc20, and all were done successfully without
_GNU_SOURCE. They are all on x86_64.

I checked man pread and man pwrite on each environments for
_GNU_SOURCE but I didn't find it. What I found was _XOPEN_SOURCE
description only. For example this is man pread on RHEL6.5.

$ LANG=C man pread
PREAD(2)                   Linux Programmer's Manual                  PREAD(2)

NAME
       pread, pwrite - read from or write to a file descriptor at a given offset

SYNOPSIS
       #define _XOPEN_SOURCE 500

       #include <unistd.h>

       ssize_t pread(int fd, void *buf, size_t count, off_t offset);

       ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);

Note that just as I said the above, building was successfully done on
this environment.

--
Thanks.
HATAYAMA, Daisuke


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to