Bug 6036 - conflicting types for 'key_setnet'
Summary: conflicting types for 'key_setnet'
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xdm (show other bugs)
Version: git
Hardware: x86 (IA32) other
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 5041
  Show dependency treegraph
 
Reported: 2006-02-25 08:11 UTC by Jeremy C. Reed
Modified: 2006-02-24 18:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to check for key_setnet declaration (1.39 KB, patch)
2006-02-25 12:25 UTC, Alan Coopersmith
no flags Details | Splinter Review

Description Jeremy C. Reed 2006-02-25 08:11:18 UTC
(Will someone add DragonFly to the OS dropdown in bugzilla?)

On DragonFly, building app/xdm:

session.c:58: error: conflicting types for 'key_setnet'
/usr/include/rpc/auth.h:239: error: previous declaration of 'key_setnet'
was here
session.c:58: error: conflicting types for 'key_setnet'
/usr/include/rpc/auth.h:239: error: previous declaration of 'key_setnet'
was here
session.c:147: warning: initialization from incompatible pointer type


My workaround:

--- app/xdm/session.c   8 Nov 2005 06:33:31 -0000       1.3
+++ app/xdm/session.c   24 Feb 2006 21:05:41 -0000
@@ -55,7 +55,10 @@
 #ifdef SECURE_RPC
 # include <rpc/rpc.h>
 # include <rpc/key_prot.h>
+/*
+removed for DragonFly
 extern int key_setnet(struct key_netstarg *arg);
+*/
Comment 1 Alan Coopersmith 2006-02-25 12:25:11 UTC
Created attachment 4741 [details] [review]
Patch to check for key_setnet declaration

Try this patch, which checks to see if key_setnet is defined in your system
headers before redefinining it.
Comment 2 Jeremy C. Reed 2006-02-25 12:54:42 UTC
I tried the patch, but then ./configure fails with:
...
checking pkg-config is at least version 0.9.0... yes
checking for XDM... yes
checking for XINERAMA... yes
checking for XPM... yes
./configure.lineno: 21372: Syntax error: word unexpected (expecting ")"

I looked at the line number and it just had several empty lines.

I did make distclean. Ran ./autogen.sh.

Anyways, I used the build.sh a couple times. And it worked. So your patch helps.

I can repeat the configure error above by running  ./autogen.sh in the app/xdm
directory -- I guess I have some other error or a misunderstanding how to do
this (even though I have experience doing this many times for years).

Also, I guess I never saw the key_setnet error before with monolithic because
the SECURE_RPC was probably never defined.

Comment 3 Jeremy C. Reed 2006-02-25 13:13:19 UTC
No related to this bug itself, but in my last commend here I mentioned an error.
I   now see that running autogen.sh within the directory didn't convert the
XAW_CHECK_XPRINT_SUPPORT(XDM_PRINT) macro.
Comment 4 Alan Coopersmith 2006-02-25 13:23:41 UTC
Thanks for testing and the followup that the autoconf errors were not caused by
this change - I've gone ahead and checked into CVS HEAD.

CVSROOT:	/cvs/xorg
Module name:	app
Changes by:	alanc@kemper.freedesktop.org	06/02/25 02:21:51

Log message:
  2006-02-24  Alan Coopersmith  <alan.coopersmith@sun.com>
  
  	* configure.ac:
  	* session.c:
  	Bug #6036 <https://bugs.freedesktop.org/show_bug.cgi?id=6036>
  	Check for key_setnet declaration before defining it to avoid
  	compiler error of conflicting types on DragonFly BSD

Modified files:
      app/xdm/:
        ChangeLog configure.ac session.c 
  
  Revision      Changes    Path
  1.30          +8 -0      app/xdm/ChangeLog
  http://cvs.freedesktop.org/xorg/app/xdm/ChangeLog
  1.32          +9 -0      app/xdm/configure.ac
  http://cvs.freedesktop.org/xorg/app/xdm/configure.ac
  1.4           +3 -1      app/xdm/session.c
  http://cvs.freedesktop.org/xorg/app/xdm/session.c


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.