-const char jcc_rcs[] = "$Id: jcc.c,v 1.450 2016/12/24 16:01:32 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.454 2017/05/25 11:14:38 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
# ifdef __OS2__
#define INCL_DOS
# include <os2.h>
-#define bzero(B,N) memset(B,0x00,n)
# endif
# ifndef FD_ZERO
privoxy_mutex_t localtime_mutex;
#endif /* ndef HAVE_GMTIME_R */
-#ifndef HAVE_RANDOM
+#if !defined(HAVE_ARC4RANDOM) && !defined(HAVE_RANDOM)
privoxy_mutex_t rand_mutex;
-#endif /* ndef HAVE_RANDOM */
+#endif /* !defined(HAVE_ARC4RANDOM) && !defined(HAVE_RANDOM) */
#endif /* def MUTEX_LOCKS_AVAILABLE */
enum chunk_status status;
while (CHUNK_STATUS_MISSING_DATA ==
- (status = chunked_body_is_complete(csp->client_iob,&body_length)))
+ (status = chunked_body_is_complete(csp->client_iob, &body_length)))
{
char buf[BUFFER_SIZE];
int len;
*********************************************************************/
static void chat(struct client_state *csp)
{
- char buf[BUFFER_SIZE];
const struct forward_spec *fwd;
struct http_request *http;
/* Skeleton for HTTP response, if we should intercept the request */
struct http_response *rsp;
- memset(buf, 0, sizeof(buf));
-
http = csp->http;
if (receive_client_request(csp) != JB_ERR_OK)
privoxy_mutex_init(&localtime_mutex);
#endif /* ndef HAVE_GMTIME_R */
-#ifndef HAVE_RANDOM
+#if !defined(HAVE_ARC4RANDOM) && !defined(HAVE_RANDOM)
privoxy_mutex_init(&rand_mutex);
-#endif /* ndef HAVE_RANDOM */
+#endif /* !defined(HAVE_ARC4RANDOM) && !defined(HAVE_RANDOM) */
#endif /* def MUTEX_LOCKS_AVAILABLE */
}
{
int argc_pos = 0;
int do_config_test = 0;
+#ifndef HAVE_ARC4RANDOM
unsigned int random_seed;
+#endif
#ifdef unix
struct passwd *pw = NULL;
struct group *grp = NULL;
InitWin32();
#endif
+#ifndef HAVE_ARC4RANDOM
random_seed = (unsigned int)time(NULL);
#ifdef HAVE_RANDOM
srandom(random_seed);
#else
srand(random_seed);
#endif /* ifdef HAVE_RANDOM */
+#endif /* ifndef HAVE_ARC4RANDOM */
/*
* Unix signal handling