From: "Qiu, Michael" <michael.qiu@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>,
David Marchand <david.marchand@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eal/linux: fix build
Date: Thu, 5 Mar 2015 09:13:13 +0000 [thread overview]
Message-ID: <533710CFB86FA344BFBF2D6802E60286CEED33@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1637153.LCrn9VkBbJ@xps13>
On 3/4/2015 6:24 AM, Thomas Monjalon wrote:
>>> Compilation fails in some distributions because of missing unistd.h
>>> needed for pread/pwrite (seen with Suse):
>>> lib/librte_eal/linuxapp/eal/eal_pci_uio.c:62:2:
>>> error: implicit declaration of function ‘pread’
>>>
>>> Fixes: 4a499c649590 ("eal/linux: enable uio_pci_generic support")
>>>
>>> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
>> Acked-by: David Marchand <david.marchand@6wind.com>
> Applied
Hi, Thomas
This patch may be need to be reverted, as the error still exists.
suse-11-sp3-32:~/dpdk # uname -a
Linux suse-11-sp3-32 3.0.76-0.11-pae #1 SMP Fri Jun 14 08:21:43 UTC 2013
(ccab990) i686 i686 i386 GNU/Linux
suse-11-sp3-32:~/dpdk # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.1/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ./configure
Thread model: posix
gcc version 4.5.1 (GCC)
As I try to check the manual of pread, find that it has two:
----------------------------------------------------------
Man: find all matching manual pages
* pread (2)
pread (3p)
Man: What manual page do you want?
Man:
-------------------------------------------------------------
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);
--------------------------------------------------------------------------------------------------------------------------------------------
READ(3P) POSIX
Programmer's
Manual READ(3P)
PROLOG
This manual page is part of the POSIX Programmer's Manual. The
Linux implementation of this interface may differ (consult the
corresponding Linux
manual page for details of Linux behavior), or the interface may
not be implemented on Linux.
NAME
pread, read - read from a file
SYNOPSIS
#include <unistd.h>
ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset);
ssize_t read(int fildes, void *buf, size_t nbyte);
DESCRIPTION
------------------------------------------------------------------------------------------------------------------------------------------
While I try to add marco #define _XOPEN_SOURCE 500
Other errors show up
Who knows how to solve this issue?
Thanks,
Michael
>
next prev parent reply other threads:[~2015-03-05 9:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 8:44 Thomas Monjalon
2015-03-03 9:12 ` David Marchand
2015-03-03 22:23 ` Thomas Monjalon
2015-03-05 9:13 ` Qiu, Michael [this message]
2015-03-05 9:28 ` Ananyev, Konstantin
2015-03-05 9:51 ` Thomas Monjalon
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=533710CFB86FA344BFBF2D6802E60286CEED33@SHSMSX101.ccr.corp.intel.com \
--to=michael.qiu@intel.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/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;
as well as URLs for NNTP newsgroup(s).