Bug 4913 - Error comiling python/py_smb.c - Samba Version is 3.0.25c
Error comiling python/py_smb.c - Samba Version is 3.0.25c
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: python
3.0.25
Other All
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-23 01:31 UTC by Henning Henkel
Modified: 2007-08-23 08:22 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Henkel 2007-08-23 01:31:54 UTC
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c python/py_smb.c -o build/temp.linux-i686-2.4/python/py_smb.o -g -Wall -O2 -D_SAMBA_BUILD_=3 -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED -g -Wall -O2 -D_SAMBA_BUILD_=3 -I/usr/src/samba_stuff-3.0.25/samba-3.0.25c/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED -I/usr/src/samba_stuff-3.0.25/samba-3.0.25c/source/lib -D_SAMBA_BUILD_=3
In file included from /usr/include/python2.4/Python.h:8,
                 from ./python/py_common.h:33,
                 from ./python/py_smb.h:24,
                 from python/py_smb.c:21:
/usr/include/python2.4/pyconfig.h:851:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdio.h:28,
                 from ./lib/replace/replace.h:39,
                 from include/includes.h:29,
                 from ./python/py_common.h:24,
                 from ./python/py_smb.h:24,
                 from python/py_smb.c:21:
/usr/include/features.h:150:1: warning: this is the location of the previous definition
python/py_smb.c: In function ‘py_smb_connect’:
python/py_smb.c:51: error: wrong type argument to unary exclamation mark
python/py_smb.c: In function ‘py_smb_session_request’:
python/py_smb.c:71: warning: assignment discards qualifiers from pointer target type
Comment 1 Henning Henkel 2007-08-23 01:32:39 UTC
(In reply to comment #0)
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes
> -fPIC -I/usr/include/python2.4 -c python/py_smb.c -o
> build/temp.linux-i686-2.4/python/py_smb.o -g -Wall -O2 -D_SAMBA_BUILD_=3
> -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
> -DLDAP_DEPRECATED -g -Wall -O2 -D_SAMBA_BUILD_=3
> -I/usr/src/samba_stuff-3.0.25/samba-3.0.25c/source/iniparser/src -Iinclude
> -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns
> -I./librpc -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> -D_GNU_SOURCE -DLDAP_DEPRECATED
> -I/usr/src/samba_stuff-3.0.25/samba-3.0.25c/source/lib -D_SAMBA_BUILD_=3
> In file included from /usr/include/python2.4/Python.h:8,
>                  from ./python/py_common.h:33,
>                  from ./python/py_smb.h:24,
>                  from python/py_smb.c:21:
> /usr/include/python2.4/pyconfig.h:851:1: warning: "_POSIX_C_SOURCE" redefined
> In file included from /usr/include/stdio.h:28,
>                  from ./lib/replace/replace.h:39,
>                  from include/includes.h:29,
>                  from ./python/py_common.h:24,
>                  from ./python/py_smb.h:24,
>                  from python/py_smb.c:21:
> /usr/include/features.h:150:1: warning: this is the location of the previous
> definition
> python/py_smb.c: In function ‘py_smb_connect’:
> python/py_smb.c:51: error: wrong type argument to unary exclamation mark
> python/py_smb.c: In function ‘py_smb_session_request’:
> python/py_smb.c:71: warning: assignment discards qualifiers from pointer target
> type
> 

Comment 2 Henning Henkel 2007-08-23 01:37:08 UTC
Huups, sorry for that second posting.

Tried to fix the issue by changing code in the file, as it looks like the return value of cli_connect() has changed from boolean to ntstatus.

42d41
<   NTSTATUS nt_status;
52,53c51
<   nt_status = cli_connect(cli, server, &ip);
<   if (!NT_STATUS_IS_OK(nt_status))
---
>       if (!cli_connect(cli, server, &ip))

Is this the correct solution?

Cheers

Henning
Comment 3 Volker Lendecke 2007-08-23 08:22:52 UTC
Fixed with r24635. Sorry, I forgot to mention you in the checkin message.

Volker