From: Ralph Corderoy Date: Mon, 15 May 2017 23:02:30 +0000 (+0100) Subject: sbr/m_rand.c: Move prototype from h/prototypes.h to new header. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/82fdc5b09ce9a9a0442c98af3c2d45390920a02f?ds=inline;hp=--cc sbr/m_rand.c: Move prototype from h/prototypes.h to new header. --- 82fdc5b09ce9a9a0442c98af3c2d45390920a02f diff --git a/Makefile.am b/Makefile.am index c3c19566..12462dd7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -360,6 +360,7 @@ noinst_HEADERS = \ sbr/ctype-checked.h \ sbr/lock_file.h \ sbr/m_mktemp.h \ + sbr/m_rand.h \ thirdparty/jsmn/jsmn.h \ uip/mhfree.h \ uip/mhoutsbr.h \ diff --git a/h/prototypes.h b/h/prototypes.h index 76332fed..eb9c09f4 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -233,7 +233,6 @@ int m_gmprot (void); char *m_maildir (char *); char *m_mailpath (char *); char *m_name (int); -int m_rand (unsigned char *, size_t); /* * Create a subprocess and redirect our standard output to it. diff --git a/sbr/m_rand.c b/sbr/m_rand.c index a05bb4ab..3227aef9 100644 --- a/sbr/m_rand.c +++ b/sbr/m_rand.c @@ -11,6 +11,7 @@ #include /* for time() */ #include +#include "m_rand.h" #if !HAVE_ARC4RANDOM static int seeded = 0; diff --git a/sbr/m_rand.h b/sbr/m_rand.h new file mode 100644 index 00000000..5e5c4409 --- /dev/null +++ b/sbr/m_rand.h @@ -0,0 +1,8 @@ +/* m_rand.h -- provide pseudorandom bytes. + * + * This code is Copyright (c) 2017, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. + */ + +int m_rand(unsigned char *buf, size_t n); diff --git a/sbr/message_id.c b/sbr/message_id.c index 8c138665..78f1c4ea 100644 --- a/sbr/message_id.c +++ b/sbr/message_id.c @@ -7,6 +7,7 @@ */ #include +#include "m_rand.h" #include /* for gettimeofday() */