Linux 2.1.x, NSPR: duplicate function already exists by default on the system

VERIFIED FIXED

Status

P3
major
VERIFIED FIXED
21 years ago
4 months ago

People

(Reporter: lstep, Assigned: wtc)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

21 years ago
Created by Luc Stepniewski (lstep@mail.dotcom.fr) on Tuesday, April 14, 1998 3:12:29 PM PDT
Additional Details :
I'm using a debian Linux, glibc, with kernel 2.1.91.
The compilation aborts because the file
ns/nsprpub/pr/src/misc/prnetdb.c contains a function
declaration that conflicts with one of the predefined
function in the kernel.
It is the function getprotobynumber_r(PRInt32 number)
which already exists and is used for 'reentrant' network
use.

Here is the full error message, if this can help:
gcc -o Linux2.1.91_x86_DBG.OBJ/prnetdb.o -c -g -fPIC -ansi
-Wall -DLINUX -Dlinux -mno-486 -DLINUX1_2 -Di386
-D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR -DFORCE_PR_LOG
-DXP_UNIX -DDEBUG -UNDEBUG -DDEBUG_enlight
-D_PR_LOCAL_THREADS_ONLY
-I../../../../dist/Linux2.1.91_x86_DBG.OBJ/include/private
-I../../../../dist/Linux2.1.91_x86_DBG.OBJ/include
prnetdb.c
prnetdb.c:383: conflicting types for `getprotobyname_r'
/usr/include/netdb.h:330: previous declaration of
`getprotobyname_r'
prnetdb.c:388: conflicting types for `getprotobynumber_r'
/usr/include/netdb.h:337: previous declaration of
`getprotobynumber_r'
Updated by Wan-Teh Chang (wtc@netscape.com) on Friday, April 24, 1998 12:59:47 PM PDT
Additional Details :
You can try one of the two fixes:
1. ns/nsprpub/config/Linux.mk: pretend that you are
   on a 2.0.x system, i.e., add this
        ifeq ($(basename $(OS_RELEASE)),2.0)
        PLATFORM_FLAGS += -DLINUX2_0
        endif

2. ns/nsprpub/pr/src/misc/prnetdb.c: change the 'LINUX2_0'
   macro to 'LINUX'.

I think solution 2 alone should fix this problem.  But
in the meantime, it's probably a good idea to define the
LINUX2_0 macro on 2.1.x systems.
Updated by Wan-Teh Chang (wtc@netscape.com) on Tuesday, June 16, 1998 8:30:53 PM PDT
Additional Details :
I checked in solution 2 (checking 'LINUX'
instead of 'LINUX2_0' in prnetdb.c), so
it should work now.

Closed the bug.

By the way, I had a typo in my previous message.
Solution 1 should read:
      ifeq ($(basename $(OS_RELEASE)),2.1)
      PLATFORM_FLAGS += -DLINUX2_0
      endif

Comment 1

20 years ago
NSPR now has its own Bugzilla product.  Moving this bug to the NSPR product.

Comment 2

18 years ago
[mass change] these bugs are closed but have no resolution.  reopening...
Status: CLOSED → REOPENED

Comment 3

18 years ago
marking as fixed.
Status: REOPENED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 4

16 years ago
VERIFIED due to no changes in over a year
Status: RESOLVED → VERIFIED

Comment 5

4 months ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/e2c65935712a998c820a83737f8e3871507398fa
Merge pull request #4849 from schalkneethling/issue#223-small-tweaks-to-tabbed-editor-heights

bug 1468540: Prepend .interactive to tabbed editor classes to fix specificity bug
You need to log in before you can comment on or make changes to this bug.