Personal tools
You are here: Home Issue tracker O_CLOEXEC undefined on RHEL5.5

#53 — O_CLOEXEC undefined on RHEL5.5

State Resolved
Version: 0.6.9
Area User interface
Issue type Bug
Severity Medium
Submitted by Seth Heeren
Submitted on Jun 04, 2010
Responsible Seth Heeren
Target release: 0.7.0
Return to tracker
Last modified on Nov 29, 2010 by Seth Heeren
Juste a quick note, trying to build on RHEL5.5 gives:

se/ptrace.c
gcc -o zfs-fuse/util.o -c -pipe -Wall -std=c99 -Wno-switch -Wno-unused
-Wno-missing-braces -Wno-parentheses -Wno-uninitialized -fno-strict-aliasing
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\"zfs-fuse\"
-s -O2 -DNDEBUG -D_KERNEL -DLINUX_AIO -Ilib/libavl/include
-Ilib/libnvpair/include -Ilib/libumem/include -Ilib/libzfscommon/include
-Ilib/libsolkerncompat/include zfs-fuse/util.c
zfs-fuse/util.c: In function 'zfsfuse_do_locking':
zfs-fuse/util.c:99: error: 'O_CLOEXEC' undeclared (first use in this
function)
zfs-fuse/util.c:99: error: (Each undeclared identifier is reported only once
zfs-fuse/util.c:99: error: for each function it appears in.)

0.6.9_beta3 and previous rpmbuilt fine before...

Vincent
Added by Seth Heeren on Jun 04, 2010 09:43 AM
Issue state: unconfirmedresolved
Dropping the CLO_EXEC

I've misread the man page. It is useless after the fork anyway.

It was overly precise. FDs die with the process termination. Flocks die when files are closed.
No need to explicitely close on termination.

Thanks for the report

(patch on testing branch)
Added by Uwe Kubosch on Jul 03, 2010 08:01 PM
Target release: 0.6.90.7.0
This did not make it to the 0.6.9 release, right? It still fails on RH5 and EPEL5.

Changing the target release to 0.7.0.

This means 0.6.9 will not be released on Fedora EPEL 5.

Added by (anonymous) on Nov 29, 2010 02:45 PM
Open this file: zfs-fuse-0.6.9/src/zfs-fuse/util.c
and search for this string: "* first byte; the file /must/ already exist"
Change line below it to this:
 #ifdef O_CLOEXEC
  lock_fd = open(LOCKFILE, O_WRONLY|O_CLOEXEC);
 #else
  lock_fd = open(LOCKFILE, O_WRONLY);
 #endif
 if(lock_fd == -1)
  return -1;
Source: http://groups.google.com/gr[…]m%2Fmonth%2F2010-06%3F&
Added by Seth Heeren on Nov 29, 2010 02:52 PM
I don't know who posted that, but usually we use patches to communicate changes:

http://gitweb.zfs-fuse.net/[…]af40f874c6d22f0565f9fca2802

Note that this patch is in since June 4th and as such is in maint, testing AND unstable branches.

Maint is what you get when you download off the frontpage of zfs-fuse.net

HTH