| 1 |
|
| 2 |
/* |
| 3 |
* Copyright (c) 2020 |
| 4 |
* |
| 5 |
* Permission to use, copy, modify, and distribute this software for any |
| 6 |
* purpose with or without fee is hereby granted, provided that the above |
| 7 |
* copyright notice and this permission notice appear in all copies. |
| 8 |
* |
| 9 |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 10 |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 11 |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 12 |
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 13 |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 14 |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 |
*/ |
| 17 |
|
| 18 |
#ifndef _MACPORTS_SYS_AIO_H_ |
| 19 |
#define _MACPORTS_SYS_AIO_H_ |
| 20 |
|
| 21 |
/* MP support header */ |
| 22 |
#include "MacportsLegacySupport.h" |
| 23 |
|
| 24 |
|
| 25 |
/* in the MacOSX10.4.sdk, several definitions are missing from this file that are included |
| 26 |
in later SDKs. This fix includes the headers in the order used in this file |
| 27 |
later SDKs, and adds the two missing definitions prior to calling the |
| 28 |
usual header. |
| 29 |
|
| 30 |
The alternate method here would be to copy in the header from the |
| 31 |
MacOSX10.4.sdk and patch it in place, as is done in gcc. We may do that |
| 32 |
in the end, if it turns out to be less intrusive. |
| 33 |
|
| 34 |
*/ |
| 35 |
|
| 36 |
#if __MP_LEGACY_SUPPORT_SYSAIOTIGERFIX__ |
| 37 |
|
| 38 |
#include <sys/signal.h> |
| 39 |
#include <sys/_types.h> |
| 40 |
#include <sys/cdefs.h> |
| 41 |
|
| 42 |
#ifndef _OFF_T |
| 43 |
typedef __darwin_off_t off_t; |
| 44 |
#define _OFF_T |
| 45 |
#endif |
| 46 |
|
| 47 |
#ifndef _SSIZE_T |
| 48 |
#define _SSIZE_T |
| 49 |
typedef __darwin_ssize_t ssize_t; |
| 50 |
#endif |
| 51 |
|
| 52 |
#endif /* __MP_LEGACY_SUPPORT_SYSAIOTIGERFIX__ */ |
| 53 |
|
| 54 |
/* Include the primary system sys/aio.h */ |
| 55 |
#include_next <sys/aio.h> |
| 56 |
|
| 57 |
#endif /* _MACPORTS_SYS_AIO_H_ */ |