Browse Source

Land #56, add fallback definition for __packed

master
Brent Cook 4 years ago
parent
commit
a64f362034
2 changed files with 5 additions and 0 deletions
  1. +4
    -0
      include/sys/types.h
  2. +1
    -0
      m4/check-os-options.m4

+ 4
- 0
include/sys/types.h View File

@ -22,6 +22,10 @@
# define __bounded__(x, y, z) # define __bounded__(x, y, z)
#endif #endif
#if !defined(HAVE_ATTRIBUTE__PACKED) && !defined(__packed)
# define __packed __attribute__((__packed__))
#endif
/* /*
* Define BSD-style unsigned bits types for systems that do not have them. * Define BSD-style unsigned bits types for systems that do not have them.
*/ */


+ 1
- 0
m4/check-os-options.m4 View File

@ -69,6 +69,7 @@ case $host_os in
HOST_ABI=elf HOST_ABI=elf
AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD gcc has bounded]) AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD gcc has bounded])
AC_DEFINE([HAVE_ATTRIBUTE__DEAD], [1], [OpenBSD gcc has __dead]) AC_DEFINE([HAVE_ATTRIBUTE__DEAD], [1], [OpenBSD gcc has __dead])
AC_DEFINE([HAVE_ATTRIBUTE__PACKED], [1], [OpenBSD gcc has __packed])
;; ;;
*solaris*) *solaris*)
HOST_OS=solaris HOST_OS=solaris


Loading…
Cancel
Save