Bug 6924 - Fails to build on QNX because delay variable conflicts with delay system function
Fails to build on QNX because delay variable conflicts with delay system func...
Status: RESOLVED FIXED
Product: Samba 3.5
Classification: Unclassified
Component: Build environment
unspecified
x86 Other
: P3 normal
: ---
Assigned To: Björn Jacke
Samba QA Contact
http://build.samba.org/?function=View...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-24 08:32 UTC by Matt Kraai
Modified: 2009-11-25 18:09 UTC (History)
0 users

See Also:


Attachments
Rename delay to delay_between_ops (2.94 KB, patch)
2009-11-25 16:26 UTC, Matt Kraai
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Kraai 2009-11-24 08:32:00 UTC
The Samba 3 source code on the master branch fails to build with the following error:

utils/dbwrap_torture.c:53: error: 'delay' redeclared as different kind of symbol
/usr/qnx641/target/qnx6/usr/include/unistd.h:514: error: previous declaration of 'delay' was here
The following command failed:
ccache gcc -I../lib/zlib -I/usr/local/include -O -I. -I/home/build/build_farm/samba_3_master/source -I/home/build/build_farm/samba_3_master/source/../lib/popt -I/home/build/build_farm/samba_3_master/source/iniparser/src -Iinclude -I/home/build/build_farm/samba_3_master/source/include -I. -I/home/build/build_farm/samba_3_master/source -I/home/build/build_farm/samba_3_master/source/../lib/replace -I/home/build/build_farm/samba_3_master/source/../lib/tevent -I/home/build/build_farm/samba_3_master/source/libaddns -I/home/build/build_farm/samba_3_master/source/librpc -I/home/build/build_farm/samba_3_master/source/.. -I/home/build/build_farm/samba_3_master/source/../lib/talloc -I../lib/tdb/include -DHAVE_CONFIG_H  -I/usr/local/include -D_LARGEFILE64_SOURCE -Iinclude -I/home/build/build_farm/samba_3_master/source/include -I. -I/home/build/build_farm/samba_3_master/source -I/home/build/build_farm/samba_3_master/source/../lib/replace -I/home/build/build_farm/samba_3_master/source/../lib/tevent -I/home/build/build_farm/samba_3_master/source/libaddns -I/home/build/build_farm/samba_3_master/source/librpc -I/home/build/build_farm/samba_3_master/source/.. -I/home/build/build_farm/samba_3_master/source/../lib/popt -I/usr/local/include -DLDAP_DEPRECATED  -I/home/build/build_farm/samba_3_master/source/lib -I.. -I../source4 -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3  -c utils/dbwrap_torture.c -o utils/dbwrap_torture.o

You can find documentation of the delay function at http://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/d/delay.html.  Renaming the variable to a different value (e.g., delay_seconds) should fix the problem.
Comment 1 Matt Kraai 2009-11-25 16:26:12 UTC
Created attachment 5013 [details]
Rename delay to delay_between_ops

Rename delay to delay_between_ops.
Comment 2 Guenther Deschner 2009-11-25 16:42:06 UTC
(In reply to comment #1)
> Created an attachment (id=5013) [details]
> Rename delay to delay_between_ops
> 
> Rename delay to delay_between_ops.

I am afraid I just solved it very similarly an hour ago with this:
http://git.samba.org/?p=samba.git;a=commitdiff;h=4f89b3993c70ff95fd6e2e273f7699a80f4412cc

Looks ok ? If so, we should get it to v3-4-test as well (if the problem exists there as well).


Comment 3 Matt Kraai 2009-11-25 17:54:22 UTC
(In reply to comment #2)
> I am afraid I just solved it very similarly an hour ago with this:
> http://git.samba.org/?p=samba.git;a=commitdiff;h=4f89b3993c70ff95fd6e2e273f7699a80f4412cc

Excellent.  At least I was on the right track.  :)

> Looks ok ? If so, we should get it to v3-4-test as well (if the problem exists
> there as well).

Yes, utils/dbwrap_torture.c compiles successfully with that change.  Since this file doesn't exist on the v3-4-test branch, I'm closing the bug.
Comment 4 Guenther Deschner 2009-11-25 18:09:00 UTC
Thank you for looking after this!