[Home]

Summary:ASTERISK-17031: [patch] main/asterisk.c compile errors
Reporter:Barry Miller (bjm)Labels:
Date Opened:2010-11-26 15:32:32.000-0600Date Closed:2010-11-29 01:30:10.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Portability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20101127__issue18384__1.6.2.diff.txt
( 1) 20101127__issue18384__1.8.diff.txt
( 2) cred-diffs
Description:Compiling on OpenBSD results in

asterisk.c:1209: error: 'struct ucred' has no member named 'uid'
asterisk.c:1210: error: 'struct ucred' has no member named 'gid'

OpenBSD uses cr_uid and cr_gid instead.
Comments:By: Tilghman Lesher (tilghman) 2010-11-27 04:26:24.000-0600

The way we prefer to do this is to check for the actual functionality, instead of using the incidental property of the operating system name.

By: Barry Miller (bjm) 2010-11-28 22:31:27.000-0600

Tested*.  Works fine.  Thanks for the patch and the advice.

*With patched configure only, not re-built from configure.ac.

By: Digium Subversion (svnbot) 2010-11-29 01:27:11.000-0600

Repository: asterisk
Revision: 296533

U   branches/1.6.2/configure
U   branches/1.6.2/configure.ac
U   branches/1.6.2/include/asterisk/autoconfig.h.in
U   branches/1.6.2/main/asterisk.c

------------------------------------------------------------------------
r296533 | tilghman | 2010-11-29 01:27:11 -0600 (Mon, 29 Nov 2010) | 13 lines

I love standards.  There are so many to choose from.  Except when there isn't one.

Linux and *BSD disagree on the elements within the ucred structure.  Detect
which one is in use on the system.

(closes issue ASTERISK-17031)
Reported by: bjm
Patches:
      cred-diffs uploaded by bjm (license 473)
      20101127__issue18384__1.6.2.diff.txt uploaded by tilghman (license 14)
      20101127__issue18384__1.8.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman, bjm

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

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

By: Digium Subversion (svnbot) 2010-11-29 01:28:45.000-0600

Repository: asterisk
Revision: 296534

_U  branches/1.8/
U   branches/1.8/configure
U   branches/1.8/configure.ac
U   branches/1.8/include/asterisk/autoconfig.h.in
U   branches/1.8/main/asterisk.c

------------------------------------------------------------------------
r296534 | tilghman | 2010-11-29 01:28:45 -0600 (Mon, 29 Nov 2010) | 20 lines

Merged revisions 296533 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
 r296533 | tilghman | 2010-11-29 01:27:09 -0600 (Mon, 29 Nov 2010) | 13 lines
 
 I love standards.  There are so many to choose from.  Except when there isn't one.
 
 Linux and *BSD disagree on the elements within the ucred structure.  Detect
 which one is in use on the system.
 
 (closes issue ASTERISK-17031)
  Reported by: bjm
  Patches:
        cred-diffs uploaded by bjm (license 473)
        20101127__issue18384__1.6.2.diff.txt uploaded by tilghman (license 14)
        20101127__issue18384__1.8.diff.txt uploaded by tilghman (license 14)
  Tested by: tilghman, bjm
........

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

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

By: Digium Subversion (svnbot) 2010-11-29 01:30:10.000-0600

Repository: asterisk
Revision: 296535

_U  trunk/
U   trunk/configure
U   trunk/configure.ac
U   trunk/include/asterisk/autoconfig.h.in
U   trunk/main/asterisk.c

------------------------------------------------------------------------
r296535 | tilghman | 2010-11-29 01:30:10 -0600 (Mon, 29 Nov 2010) | 27 lines

Merged revisions 296534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r296534 | tilghman | 2010-11-29 01:28:44 -0600 (Mon, 29 Nov 2010) | 20 lines
 
 Merged revisions 296533 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ........
   r296533 | tilghman | 2010-11-29 01:27:09 -0600 (Mon, 29 Nov 2010) | 13 lines
   
   I love standards.  There are so many to choose from.  Except when there isn't one.
   
   Linux and *BSD disagree on the elements within the ucred structure.  Detect
   which one is in use on the system.
   
   (closes issue ASTERISK-17031)
    Reported by: bjm
    Patches:
          cred-diffs uploaded by bjm (license 473)
          20101127__issue18384__1.6.2.diff.txt uploaded by tilghman (license 14)
          20101127__issue18384__1.8.diff.txt uploaded by tilghman (license 14)
    Tested by: tilghman, bjm
 ........
................

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

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