[Home]

Summary:ASTERISK-05502: res/res_*odbc.c missing stdio.h
Reporter:Jason Parker (jparker)Labels:
Date Opened:2005-11-08 02:16:04.000-0600Date Closed:2008-01-15 15:54:58.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) stdio-fixes.patch
Description:res_config_odbc and res_odbc are missing an stdio.h, and won't compile with latest  cvs head.

Adding an include for stdio.h fixes the problem.

Kevin and Russell were fixing up a few other files with this issue last night - guess these were missed.


****** ADDITIONAL INFORMATION ******

gcc  -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i686 -DZAPTEL_OPTIMIZATIONS         -fomit-frame-pointer   -DZAPATA_MOH -DOPENSSL_NO_KRB5 -fPIC   -c -o res_odbc.o res_odbc.c
In file included from res_odbc.c:39:
../include/asterisk/file.h:52: error: syntax error before '*' token
../include/asterisk/file.h:52: warning: function declaration isn't a prototype
../include/asterisk/file.h:53: error: syntax error before '*' token
../include/asterisk/file.h:53: warning: function declaration isn't a prototype
res_odbc.c: In function `load_odbc_config':
res_odbc.c:198: warning: implicit declaration of function `sprintf'
make[1]: *** [res_odbc.o] Error 1
make[1]: Leaving directory `/usr/cvsroot/asterisk/res'
make: *** [subdirs] Error 1
Comments:By: BJ Weschke (bweschke) 2005-11-08 12:37:22.000-0600

grep is our friend :)
for i in $(grep -rl "asterisk/file.h" *); do grep -L -H "stdio.h" $i; done
identified additional apps beyond the two mentioned by north that would have failed compile on a full make clean. patch attached to repair them all. disclaimer on file.

By: Kevin P. Fleming (kpfleming) 2005-11-08 14:57:03.000-0600

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:54:58.000-0600

Repository: asterisk
Revision: 7030

U   trunk/ChangeLog
U   trunk/apps/app_curl.c
U   trunk/apps/app_datetime.c
U   trunk/apps/app_intercom.c
U   trunk/apps/app_ivrdemo.c
U   trunk/apps/app_osplookup.c
U   trunk/apps/app_skel.c
U   trunk/res/res_config_odbc.c
U   trunk/res/res_odbc.c

------------------------------------------------------------------------
r7030 | kpfleming | 2008-01-15 15:54:58 -0600 (Tue, 15 Jan 2008) | 2 lines

issue ASTERISK-5502

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=7030