fix build with zlib-ng

minizip-ng dynamically includes
zlib-ng.h or zlib.h depending on
what was included prior

snes9x.h includes zlib.h
which needs to happen first or the
minizip include tries to include zlib-ng.h by default
resulting in an error because you can't
include both in a single translation unit
This commit is contained in:
Xarblu 2025-11-05 10:36:12 +01:00
parent abfc018c90
commit 7967d5222d
No known key found for this signature in database
4 changed files with 4 additions and 4 deletions

View File

@ -12,6 +12,7 @@
#include <vector>
#include <string>
#include "snes9x.h"
#ifdef UNZIP_SUPPORT
# ifdef SYSTEM_ZIP
# include <minizip/unzip.h>
@ -19,7 +20,6 @@
# include "unzip/unzip.h"
# endif
#endif
#include "snes9x.h"
#ifndef MAX
# define MAX(a,b) ((a) > (b)? (a) : (b))

View File

@ -8,12 +8,12 @@
#include <assert.h>
#include <ctype.h>
#include "snes9x.h"
#ifdef SYSTEM_ZIP
#include <minizip/unzip.h>
#else
#include "unzip/unzip.h"
#endif
#include "snes9x.h"
#include "memmap.h"

View File

@ -10,6 +10,7 @@
#include <numeric>
#include <assert.h>
#include "snes9x.h"
#ifdef UNZIP_SUPPORT
# ifdef SYSTEM_ZIP
# include <minizip/unzip.h>
@ -25,7 +26,6 @@
#include <ctype.h>
#include <sys/stat.h>
#include "snes9x.h"
#include "memmap.h"
#include "apu/apu.h"
#include "fxemu.h"

View File

@ -7,6 +7,7 @@
// Abstract the details of reading from zip files versus FILE *'s.
#include <string>
#include "snes9x.h"
#ifdef UNZIP_SUPPORT
# ifdef SYSTEM_ZIP
# include <minizip/unzip.h>
@ -14,7 +15,6 @@
# include "unzip.h"
# endif
#endif
#include "snes9x.h"
#include "stream.h"