mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Portability fix: look for sys/endian.h as well as endian.h
- define __BYTE_ORDER and friends. - adjust asoundlib.h accordingly. Signed-off-by: Patrick Welche <prlw1@cam.ac.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
1af088e39b
commit
7a6e8ca348
4 changed files with 48 additions and 17 deletions
|
|
@ -22,13 +22,30 @@
|
|||
#ifndef __LOCAL_H
|
||||
#define __LOCAL_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#elif defined(HAVE_SYS_ENDIAN_H)
|
||||
#include <sys/endian.h>
|
||||
#ifndef __BYTE_ORDER
|
||||
#define __BYTE_ORDER BYTE_ORDER
|
||||
#endif
|
||||
#ifndef __LITTLE_ENDIAN
|
||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#endif
|
||||
#ifndef __BIG_ENDIAN
|
||||
#define __BIG_ENDIAN BIG_ENDIAN
|
||||
#endif
|
||||
#else
|
||||
#error Header defining endianness not defined
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/types.h>
|
||||
|
|
@ -36,7 +53,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#include "config.h"
|
||||
#ifdef SUPPORT_RESMGR
|
||||
#include <resmgr.h>
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue