On Sun, May 24, 2020 at 06:49:03PM -0700, Kevin wrote in <20200525014903.ga1...@afu.lan>:
diff --git a/mutt_random.h b/mutt_random.h

+#include <sys/time.h>
+#include <sys/types.h>
+#include <string.h>
+#include <unistd.h>

Mutt traditionally puts these inside the .c file. So I'd prefer to see them moved there.

+extern void mutt_to_base64 (unsigned char*, const unsigned char*, size_t, 
size_t);

Include "mutt.h" inside mutt_random.c instead.

Having made these changes, I get build errors of the kind:

(mutt_random.c):
...
#include "mutt.h"
#include "mutt_random.h"
...

In file included from mutt_random.c:23:
mutt.h:89:8: error: redefinition of ‘struct timespec’
   89 | struct timespec
      |        ^~~~~~~~
In file included from /usr/include/sys/select.h:39,
                 from /usr/include/sys/types.h:179,
                 from /usr/include/stdlib.h:394,
                 from mutt.h:24,
                 from mutt_random.c:23:
/usr/include/bits/types/struct_timespec.h:9:8: note: originally defined here
    9 | struct timespec
      |        ^~~~~~~~
In file included from mutt_random.c:23:
mutt.h:774:3: error: unknown type name ‘LOFF_T’
  774 |   LOFF_T offset;                /* offset where the actual data begins 
*/
      |   ^~~~~~

I haven't quite figured out yet how to address this.

Regards,

Remco

Reply via email to