Percona Server with XtraDB

patch for bug #803270 breaks OS X

Reported by Alexey Kopytov on 2011-07-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Undecided
Alexey Kopytov
5.1
Undecided
Alexey Kopytov
5.5
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)
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'

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)

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.

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

Other bug subscribers