patch for bug #803270 breaks OS X

Bug #806975 reported by Alexey Kopytov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Undecided
Alexey Kopytov
5.1
Fix Released
Undecided
Alexey Kopytov
5.5
Fix Released
Undecided
Alexey Kopytov

Bug Description

For some reasons fdatasync() is available but is not declared on OS X. So after the patch for bug #803270 I get the following warning (actually error, since I build with -Werror):

os/os0file.c: In function ‘os_file_fsync’:
os/os0file.c:1967: warning: implicit declaration of function ‘fdatasync’.

The solution is to replace

#ifdef HAVE_FDATASYNC

with

#if defined(HAVE_FDATASYNC) && HAVE_DECL_FDATASYNC

That's what the server has in my_sync.c

Changed in percona-server:
assignee: nobody → Alexey Kopytov (akopytov)
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Another problem introduced by that patch is that in case HAVE_FDATASYNC is not defined, there is a new warning:

os/os0file.c:1954: warning: unused parameter ‘metadata'

Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

Why do you merge directly?
Why do you merge verbose changes?
Why don't you keep InnoDB's source code? (* "__attribute__((unused))" is way of InnoDB source code)

Revision history for this message
Alexey Kopytov (akopytov) wrote :

I do not merge directly.
What do you mean by "verbose" changes?
Because the argument may be actually used depending on fdatasync() availability.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2662

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.