[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Linphone-developers] linphone 3.4.3 build error
From: |
Gerhard Stengel |
Subject: |
[Linphone-developers] linphone 3.4.3 build error |
Date: |
Sat, 2 Apr 2011 06:13:25 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.1-1.2-desktop; KDE/4.6.1; x86_64; ; ) |
Hi,
this is a posting from the linphone-users mailing list. I've the same build
problem on my machine (openSUSE 11.4, 64
bit) and now want to adress this on the developers list.
The difference to version 3.4.2 is that the offending lines in main.c look like
this on 3.4.2
#ifdef WIN32
if (workingdir!=NULL)
_chdir(workingdir);
#endif
which means on Linux the compiler never sees these lines.
In version 3.4.3 there's no #ifdef WIN32, and it's just
if (workingdir!=NULL)
chdir(workingdir); //without a preceding underscore!
however there's a define
#ifdef WIN32
#define chdir _chdir
#endif
which makes it to be the same on WIN32, but on Linux these lines are new
compared to previously.
My naive idea was to patch it to something like
(void)chdir(workingdir);
but that doesn't make the compiler happy about the unused return value...
How can this be fixed? Maybe the whole statement is dispensible on Linux, it
wasn't there on 3.4.2.
best regards
Gerhard
Am Dienstag, 29. März 2011, 22:57:34 schrieb nucleo:
> Hi,
>
> I have tried to build linphone 3.4.3 but build failed:
>
> gcc -DHAVE_CONFIG_H -I. -I.. -DIN_LINPHONE -I../coreapi/ -D_REENTRANT
> -DORTP_INET6 -
> D_REENTRANT -DORTP_INET6 -Wall -Werror -pthread -I/usr/include/gtk-2.0 -
> I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
> -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -
> I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
> -DINET6 -O2 -g -pipe -
> Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m32 -
> march=i686 -mtune=atom -fasynchronous-unwind-tables -fno-strict-aliasing -c
> main.c
> cc1: warnings being treated as errors
> main.c: In function 'main':
> main.c:1435:8: error: ignoring return value of 'chdir', declared with
> attribute warn_unused_result
> make[3]: *** [main.o] Error 1
>
- [Linphone-developers] linphone 3.4.3 build error,
Gerhard Stengel <=