Revise defines for HAVE_STDLIB_H

This commit is contained in:
Mr-DaveDev
2018-10-22 21:03:39 -06:00
committed by Mr-Dave
parent 0afea9cc4e
commit 6298716a56
4 changed files with 71 additions and 1 deletions

View File

@@ -53,7 +53,32 @@
#include "motion.h"
#include "jpegutils.h"
#include <setjmp.h>
/* This is a workaround regarding these defines. The config.h file defines
* HAVE_STDLIB_H as 1 whereas the jpeglib.h just defines it without a value.
* this causes massive warnings/error on mis-matched definitions. We do not
* control either of these so we have to suffer through this workaround hack
*/
#if (HAVE_STDLIB_H == 1)
#undef HAVE_STDLIB_H
#define HAVE_STDLIB_H_ORIG 1
#endif
#include <jpeglib.h>
#ifdef HAVE_STDLIB_H
#ifdef HAVE_STDLIB_H_ORIG
#undef HAVE_STDLIB_H
#undef HAVE_STDLIB_H_ORIG
#define HAVE_STDLIB_H 1
#else
#undef HAVE_STDLIB_H
#endif
#endif
#include <jerror.h>
#include <assert.h>

View File

@@ -369,7 +369,7 @@
<li>MySQL database functionality</li>
<ul>
<p></p>
<code><strong>sudo pkg install mysql57-client</strong></code>
<code><strong>sudo pkg install mysql57-client openssl</strong></code>
<p></p>
</ul>
<li>PostgreSQL database functionality</li>

View File

@@ -15,7 +15,29 @@
#ifndef _INCLUDE_NETCAM_H
#define _INCLUDE_NETCAM_H
/* This is a workaround regarding these defines. The config.h file defines
* HAVE_STDLIB_H as 1 whereas the jpeglib.h just defines it without a value.
* this causes massive warnings/error on mis-matched definitions. We do not
* control either of these so we have to suffer through this workaround hack
*/
#if (HAVE_STDLIB_H == 1)
#undef HAVE_STDLIB_H
#define HAVE_STDLIB_H_ORIG 1
#endif
#include <jpeglib.h>
#ifdef HAVE_STDLIB_H
#ifdef HAVE_STDLIB_H_ORIG
#undef HAVE_STDLIB_H
#undef HAVE_STDLIB_H_ORIG
#define HAVE_STDLIB_H 1
#else
#undef HAVE_STDLIB_H
#endif
#endif
#include <setjmp.h>
#include <sys/socket.h>
#include <sys/types.h>

View File

@@ -13,7 +13,30 @@
*/
#include "translate.h"
#include "rotate.h" /* already includes motion.h */
/* This is a workaround regarding these defines. The config.h file defines
* HAVE_STDLIB_H as 1 whereas the jpeglib.h just defines it without a value.
* this causes massive warnings/error on mis-matched definitions. We do not
* control either of these so we have to suffer through this workaround hack
*/
#if (HAVE_STDLIB_H == 1)
#undef HAVE_STDLIB_H
#define HAVE_STDLIB_H_ORIG 1
#endif
#include <jpeglib.h>
#ifdef HAVE_STDLIB_H
#ifdef HAVE_STDLIB_H_ORIG
#undef HAVE_STDLIB_H
#undef HAVE_STDLIB_H_ORIG
#define HAVE_STDLIB_H 1
#else
#undef HAVE_STDLIB_H
#endif
#endif
#include <jerror.h>
/*