Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler error - opensuse #65

Open
ant0sha opened this issue Mar 16, 2023 · 0 comments
Open

compiler error - opensuse #65

ant0sha opened this issue Mar 16, 2023 · 0 comments

Comments

@ant0sha
Copy link

ant0sha commented Mar 16, 2023

lot of things like this during linking step:

/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: remotesmtp.o:/dare/sys_libs_experimental/eMail/include/email.h:81: multiple definition of `Mopts'; email.o:/dare/sys_libs_experimental/eMail/src/email.c:45: first defined here

Following patch fixes it for me:

commit 3ccc3f0fe865d7c7c4be1779116e98f8476d50da
Author: Anton Sharonov <anton.sharonov@some.email.here>
Date:   Thu Mar 16 10:45:13 2023 +0100

    Make eMail compilable

diff --git a/include/email.h b/include/email.h
index 5800265..7a73533 100644
--- a/include/email.h
+++ b/include/email.h
@@ -61,8 +61,8 @@ typedef enum { GPG_SIG=0x01, GPG_ENC=0x02 } GpgCallType;
 
 
 /* Globally defined vars */
-dhash table;
-char *conf_file;
+extern dhash table;
+extern char *conf_file;
 
 struct mailer_options {
 	bool verbose;
@@ -78,7 +78,9 @@ struct mailer_options {
 	dlist to;
 	dlist cc;
 	dlist bcc;
-} Mopts;
+} ;
+
+extern struct mailer_options Mopts;
 
 void usage(void);
 
diff --git a/src/email.c b/src/email.c
index 524e9be..1966648 100644
--- a/src/email.c
+++ b/src/email.c
@@ -40,6 +40,10 @@
 #include "error.h"
 #include "mimeutils.h"
 
+dhash table;
+char *conf_file;
+struct mailer_options Mopts;
+
 static void
 defaultDestr(void *ptr)
 {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant