Description: GCC 10 complains about multiple definitions in compiling modules
Author: Francesco Paolo Lovergine <frankie@debian.org>
Forwarded: no

Index: autodir-0.99.9/src/module.h
===================================================================
--- autodir-0.99.9.orig/src/module.h	2020-07-24 15:44:58.000000000 +0000
+++ autodir-0.99.9/src/module.h	2020-07-24 15:49:16.669931760 +0000
@@ -31,10 +31,17 @@
 /*last three digits are for minor and remaining for major*/
 #define MODULE_PROTOCOL_SUPPORTED (1001)
 
+#ifdef _MODULE_C_
 module_info *(*mod_init)( char *, const char * );
 void (*mod_dir)( char *, int , const char * );
 int (*mod_dowork)( const char *, const char *, char *, int );
 void (*mod_clean)( void );
+#else
+extern module_info *(*mod_init)( char *, const char * );
+extern void (*mod_dir)( char *, int , const char * );
+extern int (*mod_dowork)( const char *, const char *, char *, int );
+extern void (*mod_clean)( void );
+#endif
 
 void module_load(char *apath);
 void module_option_modpath(char ch, char *arg, int valid);
Index: autodir-0.99.9/src/module.c
===================================================================
--- autodir-0.99.9.orig/src/module.c	2006-10-21 05:46:02.000000000 +0000
+++ autodir-0.99.9/src/module.c	2020-07-24 15:50:03.670204960 +0000
@@ -20,6 +20,8 @@
 
 */
 
+#define _MODULE_C_
+
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -48,11 +50,6 @@
 
 static module_info *modinfo;
 
-module_info *(*mod_init)( char *, const char * );
-void (*mod_dir)( char *, int , const char * );
-int (*mod_dowork)( const char *, const char *, char *, int );
-void (*mod_clean)( void );
-
 /***************************************************
   ltdl is not made thread safe because,
   ltdl library calls are made from only single thread
