Bug 89338

Summary: conflicting types for 'sync' on AIX
Product: cairo Reporter: Michael Haubenwallner <michael.haubenwallner>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: AIX   
Whiteboard:
i915 platform: i915 features:
Attachments: rename fuction 'sync' to something else

Description Michael Haubenwallner 2015-02-26 13:26:06 UTC
Actually wondering why these errors do not occur on Linux, but AIX only:

/tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/x11-libs/cairo-1.12.16-r3/work/cairo-1.12.16/src/cairo-surface-observer.c:657: error: conflicting types for 'sync'
/usr/include/unistd.h:842: error: previous declaration of 'sync' was here
/tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/x11-libs/cairo-1.12.16-r3/work/cairo-1.12.16/src/cairo-surface-observer.c: In function 'sync':
/tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/x11-libs/cairo-1.12.16-r3/work/cairo-1.12.16/src/cairo-surface-observer.c:665: warning: ignoring return value of '_cairo_surface_unmap_image', declared with attribute warn_unused_result
Makefile:2334: recipe for target 'cairo-surface-observer.lo' failed


/tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/x11-libs/cairo-1.12.16-r3/work/cairo-1.12.16/src/cairo-xlib-surface-shm.c:457: error: conflicting types for 'sync'
/usr/include/unistd.h:842: error: previous declaration of 'sync' was here
Makefile:2334: recipe for target 'cairo-xlib-surface-shm.lo' failed
make[3]: *** [cairo-xlib-surface-shm.lo] Error 1
Comment 1 Michael Haubenwallner 2015-02-26 13:30:43 UTC
Created attachment 113845 [details] [review]
rename fuction 'sync' to something else

On AIX, <math.h> somehow includes <unistd.h> which declares sync() already.

Thanks!
Comment 2 Bryce Harrington 2015-03-05 20:05:59 UTC
Thanks, applied:
   70cc8f2..ac75ab9  master -> master

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.