public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Garrett Cooper <yanegomi@gmail.com>, Miao Xie <miaox@cn.fujitsu.com>
Cc: LTP Mailing List <ltp-list@lists.sourceforge.net>
Subject: [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test
Date: Wed, 24 Mar 2010 19:06:45 +0530	[thread overview]
Message-ID: <20100324133645.23583.48891.sendpatchset@subratamodak.linux.ibm.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

Earlier Subject: Re: [LTP] ext4/e4defrag.c testcases compilation error,

Hi Garret/Miao,

On PPC systems, fallocate() seems to be already defined at /usr/include/bits/fcntl.h,
so building EXT4 test cases on PPC64 machines will create build problems even if the
pre-requisite packages:

e2fsprogs*
e2fsprogs-libs*
e2fsprogs-devel*

are present. So, this patch adds an extra check. Please let me know your thoughts.

Errors bound to occur:
[
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/subrata/ltp/ltp-dev/testcases/kernel/include -I../../../../../include -I../../../../../include   -L../../../../../lib  e4defrag.c   -lltp -lm -o e4defrag
e4defrag.c:388: error: conflicting types for ���fallocate���
/usr/include/bits/fcntl.h:240: note: previous declaration of ���fallocate��� was here
make[1]: *** [e4defrag] Error 1
]

Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
---

--- ltp-dev/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c	2010-03-15 19:32:12.000000000 +0530
+++ ltp-dev.modified/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c	2010-03-24 18:09:14.336793513 +0530
@@ -383,10 +383,13 @@ int sync_file_range(int fd, loff_t offse
  * @offset:		file offset.
  * @len:		file size.
  */
+
+#ifndef __NR_fallocate
 int fallocate(int fd, int mode, loff_t offset, loff_t len)
 {
 	return syscall(__NR_fallocate, fd, mode, offset, len);
 }
+#endif
 
 /*
  * get_mount_point() -	Get device's mount point.

---
Regards--
Subrata Modak



[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2010-03-24 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 13:36 Subrata Modak [this message]
2010-03-24 17:48 ` [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test Garrett Cooper
2010-03-25 18:56   ` Subrata Modak
2010-03-25 21:13     ` Garrett Cooper
2010-03-26  5:35     ` Miao Xie

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=20100324133645.23583.48891.sendpatchset@subratamodak.linux.ibm.com \
    --to=subrata@linux.vnet.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=miaox@cn.fujitsu.com \
    --cc=yanegomi@gmail.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