[OpenAFS] make-kpkg modules_image

Rickard Lind rpl@dd.chalmers.se
Mon, 30 Dec 2002 21:33:26 +0100 (MET)


On Mon, 30 Dec 2002, Thomas Grieder wrote:

> Hi,
>
> When I do make-kpkg modules_image on my Debian 3 unstable box I get the
> following error:
>
> cc  -I/usr/src/modules/openafs/src/config -I/usr/src/modules/openafs/include
> -O2 -o rmtsysd rmtsysd.o libsys.a /usr/src/modules/openafs/lib/librx.a
> libsys.a /usr/src/modules/openafs/lib/liblwp.a
> /usr/src/modules/openafs/lib/util.a -lresolv
> libsys.a(rmtsyss.o)(.text+0x10d): In function `SRMTSYS_SetPag':
> : undefined reference to `errno'
> libsys.a(rmtsyss.o)(.text+0x21b): In function `SRMTSYS_Pioctl':
> : undefined reference to `errno'
> collect2: ld returned 1 exit status
> make[5]: *** [rmtsysd] Error 1
> make[5]: Leaving directory `/usr/src/modules/openafs/src/sys'
> make[4]: *** [sys] Error 2
> make[4]: Leaving directory `/usr/src/modules/openafs'
> make[3]: *** [build] Error 2
> make[3]: Leaving directory `/usr/src/modules/openafs'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/usr/src/modules/openafs'
> make[1]: *** [build-modules-stamp] Error 2
> make[1]: Leaving directory `/usr/src/modules/openafs'
> Module /usr/src/modules/openafs failed.
> Hit return to Continue
>
> Does anybody know a solution?

The following has worked for me:

diff -ur modules/openafs.old/src/ptserver/pt_util.c
modules/openafs/src/ptserver/pt_util.c
--- modules/openafs.old/src/ptserver/pt_util.c  2002-12-11
18:47:03.000000000 +0100
+++ modules/openafs/src/ptserver/pt_util.c      2002-12-30
21:31:15.000000000 +0100
@@ -39,6 +39,7 @@

 extern char *optarg;
 extern int optind;
+#include <errno.h>
 extern int errno;

 int display_entry();
diff -ur modules/openafs.old/src/sys/rmtsyss.c
modules/openafs/src/sys/rmtsyss.c
--- modules/openafs.old/src/sys/rmtsyss.c       2001-09-11
16:34:52.000000000 +0200
+++ modules/openafs/src/sys/rmtsyss.c   2002-12-30 21:31:15.000000000
+0100
@@ -33,6 +33,7 @@
 /*#include <afs/cellconfig.h>*/
 #include "rmtsys.h"

+#include <errno.h>
 extern int errno;   /* We ship this over the net if needed */
 extern RMTSYS_ExecuteRequest();

-- 
/Rickard Lind