You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Craig Rodrigues <ro...@attbi.com> on 2003/03/23 05:56:42 UTC

[PATCH] Fix testmutexscope test for FreeBSD

Hi,

When compiling the testmutexscope under FreeBSD, I got
the following error:

/usr/local/bin/bash /home/rodrigc/2/apr/libtool --silent --mode=link  gcc -g -O2
   -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE   -I../include  -version-info 9:2
:9    -o testmutexscope testmutexscope.lo ../libapr-0.la   -lm -lcrypt
libtool: link: warning: `-version-info' is ignored for programs
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x81): undefined reference to `main'
*** Error code 1

Stop in /usr/home/rodrigc/2/apr/test.
*** Error code 1


This fixed it:

Index: testmutexscope.c
===================================================================
RCS file: /home/cvspublic/apr/test/testmutexscope.c,v
retrieving revision 1.4
diff -u -r1.4 testmutexscope.c
--- testmutexscope.c	1 Jan 2003 00:01:56 -0000	1.4
+++ testmutexscope.c	23 Mar 2003 04:55:09 -0000
@@ -64,7 +64,7 @@
 #include "apr_thread_proc.h"
 
 #if !APR_HAS_THREADS
-static int main(void)
+int main(void)
 {
     printf("This test requires APR thread support.\n");
     return 0;

-- 
Craig Rodrigues        
http://home.attbi.com/~rodrigc
rodrigc@attbi.com