Bug 11494 - bad FFSYNC definition for sparc (and hppa)
Summary: bad FFSYNC definition for sparc (and hppa)
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: ports (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Carlos O'Donell
URL:
Keywords:
: 11495 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-13 13:27 UTC by Clint Adams
Modified: 2014-06-30 18:15 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
sparc proposed fix (216 bytes, patch)
2010-04-13 13:28 UTC, Clint Adams
Details | Diff
hppa proposed fix (220 bytes, patch)
2010-04-13 13:29 UTC, Clint Adams
Details | Diff
hppa proposed fix (220 bytes, patch)
2010-04-13 13:31 UTC, Clint Adams
Details | Diff
sparc proposed fix (216 bytes, patch)
2010-04-13 13:31 UTC, Clint Adams
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Clint Adams 2010-04-13 13:27:43 UTC
sysdeps/unix/sysv/linux/sparc/bits/fcntl.h and ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h contain 
the line

# define FFSYNC                O_FSYNC

O_FSYNC is not defined on either architecture, though O_SYNC is.
Comment 1 Clint Adams 2010-04-13 13:28:35 UTC
Created attachment 4721 [details]
sparc proposed fix

Use O_SYNC instead of O_FSYNC
Comment 2 Clint Adams 2010-04-13 13:29:16 UTC
Created attachment 4722 [details]
hppa proposed fix

Use O_SYNC instead of O_FSYNC.
Comment 3 Clint Adams 2010-04-13 13:31:25 UTC
Created attachment 4723 [details]
hppa proposed fix

Use O_SYNC instead of O_FSYNC.
Comment 4 Clint Adams 2010-04-13 13:31:34 UTC
Created attachment 4724 [details]
sparc proposed fix

Use O_SYNC instead of O_FSYNC
Comment 5 Clint Adams 2010-04-13 13:32:40 UTC
*** Bug 11495 has been marked as a duplicate of this bug. ***
Comment 6 David S. Miller 2012-02-15 22:50:21 UTC
This isn't the correct fix.

Like other platforms, sparc and hppa should provide the
compatability define:

#define O_FSYNC   O_SYNC
Comment 7 Carlos O'Donell 2012-02-16 00:58:57 UTC
(In reply to comment #6)
> This isn't the correct fix.
> 
> Like other platforms, sparc and hppa should provide the
> compatability define:
> 
> #define O_FSYNC   O_SYNC

I agree.

On 2009-11-29 hppa defined O_FSYNC to be an alias for O_SYNC and thus fixed this issue.

http://sourceware.org/git/?p=glibc-ports.git;a=commitdiff;h=b8eca7ff8ca1cbc3e1d6bec2fed4213863fa441b

Given that Dave just committed his fix and hppa's fix has been in for several years I'm marking this issue fixed.