diff --git a/mozilla/nsprpub/configure b/mozilla/nsprpub/configure index 462dda2f470..6cd63cc5d28 100755 --- a/mozilla/nsprpub/configure +++ b/mozilla/nsprpub/configure @@ -4377,6 +4377,7 @@ EOF DSO_CFLAGS=-fPIC MDCPUCFG_H=_openbsd.cfg PR_MD_CSRCS=openbsd.c + OS_LIBS="-lc" if test -z "$USE_NSPR_THREADS"; then USE_PTHREADS=1 fi diff --git a/mozilla/nsprpub/configure.in b/mozilla/nsprpub/configure.in index 679fb3256ff..47a1a431cfe 100644 --- a/mozilla/nsprpub/configure.in +++ b/mozilla/nsprpub/configure.in @@ -1751,6 +1751,7 @@ mips-sony-newsos*) DSO_CFLAGS=-fPIC MDCPUCFG_H=_openbsd.cfg PR_MD_CSRCS=openbsd.c + OS_LIBS="-lc" if test -z "$USE_NSPR_THREADS"; then USE_PTHREADS=1 fi diff --git a/mozilla/nsprpub/lib/tests/Makefile.in b/mozilla/nsprpub/lib/tests/Makefile.in index f55824ad04c..f3c052959df 100644 --- a/mozilla/nsprpub/lib/tests/Makefile.in +++ b/mozilla/nsprpub/lib/tests/Makefile.in @@ -127,6 +127,12 @@ ifeq ($(OS_ARCH), Linux) endif endif +ifeq (,$(filter-out OpenBSD,$(OS_ARCH))) + ifeq ($(USE_PTHREADS),1) + EXTRA_LIBS = -lpthread + endif +endif + ifeq ($(OS_ARCH), OSF1) LDOPTS += -rpath $(PWD)/$(dist_libdir) -lpthread endif diff --git a/mozilla/nsprpub/pr/include/md/_openbsd.cfg b/mozilla/nsprpub/pr/include/md/_openbsd.cfg index 0041a242bb9..e133d9f5291 100644 --- a/mozilla/nsprpub/pr/include/md/_openbsd.cfg +++ b/mozilla/nsprpub/pr/include/md/_openbsd.cfg @@ -48,7 +48,7 @@ #define PR_AF_INET6 24 /* same as AF_INET6 */ -#if defined(__i386__) +#if defined(__i386__) || defined(__arm__) #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN diff --git a/mozilla/nsprpub/pr/include/md/_openbsd.h b/mozilla/nsprpub/pr/include/md/_openbsd.h index ccd75306429..8719fe7802b 100644 --- a/mozilla/nsprpub/pr/include/md/_openbsd.h +++ b/mozilla/nsprpub/pr/include/md/_openbsd.h @@ -54,9 +54,11 @@ #define _PR_SI_ARCHITECTURE "powerpc" #elif defined(__sparc__) #define _PR_SI_ARCHITECTURE "sparc" +#elif defined(__arm__) +#define _PR_SI_ARCHITECTURE "arm" #endif -#define PR_DLL_SUFFIX ".so.1.0" +#define PR_DLL_SUFFIX ".so" #define _PR_VMBASE 0x30000000 #define _PR_STACK_VMBASE 0x50000000 @@ -97,6 +99,8 @@ #define JB_SP_INDEX 34 #elif defined(__amd64__) #define JB_SP_INDEX 6 +#elif defined(__arm__) +#define JB_SP_INDEX 23 #else #error "Need to define SP index in jmp_buf here" #endif diff --git a/mozilla/nsprpub/pr/src/misc/prnetdb.c b/mozilla/nsprpub/pr/src/misc/prnetdb.c index 922d84b8888..580fb51c199 100644 --- a/mozilla/nsprpub/pr/src/misc/prnetdb.c +++ b/mozilla/nsprpub/pr/src/misc/prnetdb.c @@ -103,7 +103,8 @@ PRLock *_pr_dnsLock = NULL; #if defined(OSF1) \ || defined(AIX4_3_PLUS) || (defined(AIX) && defined(_THREAD_SAFE)) \ || (defined(HPUX10_10) && defined(_REENTRANT)) \ - || (defined(HPUX10_20) && defined(_REENTRANT)) + || (defined(HPUX10_20) && defined(_REENTRANT)) \ + || defined(OPENBSD) #define _PR_HAVE_GETPROTO_R #define _PR_HAVE_GETPROTO_R_INT #endif