https://github.com/alsa-project/alsa-lib/commit/81a7a93636d9472fcb0c2ff32d9bfdf6ed10763d From 81a7a93636d9472fcb0c2ff32d9bfdf6ed10763d Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 13 Sep 2023 12:27:21 +0200 Subject: [PATCH] reshuffle included files to include config.h as first - v2 config.h may contain defines like _FILE_OFFSET_BITS which influence the system wide include files (off_t types, open -> open64 function usage etc.). Fixes: ad3a8b8b ("reshuffle included files to include config.h as first") Related: https://github.com/alsa-project/alsa-lib/pull/333 Signed-off-by: Jaroslav Kysela --- a/src/control/setup.c +++ b/src/control/setup.c @@ -29,13 +29,13 @@ * */ +#include "local.h" #include #include #include #include #include #include -#include "local.h" #ifndef DOC_HIDDEN typedef struct { --- a/src/rawmidi/rawmidi.c +++ b/src/rawmidi/rawmidi.c @@ -144,12 +144,12 @@ This example shows open and read/write rawmidi operations. * Shows open and read/write rawmidi operations. */ +#include "rawmidi_local.h" #include #include #include #include #include -#include "rawmidi_local.h" /** * \brief setup the default parameters --- a/src/rawmidi/rawmidi_local.h +++ b/src/rawmidi/rawmidi_local.h @@ -19,10 +19,10 @@ * */ +#include "local.h" #include #include #include -#include "local.h" typedef struct { int (*close)(snd_rawmidi_t *rawmidi); --- a/src/rawmidi/rawmidi_virt.c +++ b/src/rawmidi/rawmidi_virt.c @@ -19,13 +19,11 @@ * */ -#include -#include +#include "rawmidi_local.h" #include #include #include #include -#include "rawmidi_local.h" #include "seq.h" #include "seq_midi_event.h" --- a/src/rawmidi/ump.c +++ b/src/rawmidi/ump.c @@ -4,10 +4,6 @@ * \brief Universal MIDI Protocol (UMP) Interface */ -#include -#include -#include -#include "local.h" #include "rawmidi_local.h" #include "ump_local.h" --- a/src/seq/seq.c +++ b/src/seq/seq.c @@ -777,8 +777,8 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev) */ -#include #include "seq_local.h" +#include /**************************************************************************** * * --- a/src/seq/seq_hw.c +++ b/src/seq/seq_hw.c @@ -20,9 +20,9 @@ * */ +#include "seq_local.h" #include #include -#include "seq_local.h" #ifndef PIC /* entry for static linking */ --- a/src/seq/seq_local.h +++ b/src/seq/seq_local.h @@ -23,10 +23,10 @@ #ifndef __SEQ_LOCAL_H #define __SEQ_LOCAL_H +#include "local.h" #include #include #include -#include "local.h" #define SND_SEQ_OBUF_SIZE (16*1024) /* default size */ #define SND_SEQ_IBUF_SIZE 500 /* in event_size aligned */ --- a/src/seq/seq_midi_event.c +++ b/src/seq/seq_midi_event.c @@ -28,10 +28,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "local.h" #if HAVE_MALLOC_H #include #endif -#include "local.h" #ifndef DOC_HIDDEN --- a/src/seq/seqmid.c +++ b/src/seq/seqmid.c @@ -20,14 +20,12 @@ * */ -#include -#include +#include "seq_local.h" #include #include #include #include #include -#include "seq_local.h" /** * \brief queue controls - start/stop/continue --- a/src/userfile.c +++ b/src/userfile.c @@ -18,7 +18,7 @@ * */ -#include +#include "config.h" #include #include #include