aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--image_header.h2
-rw-r--r--o3000_portable.h8
2 files changed, 7 insertions, 3 deletions
diff --git a/image_header.h b/image_header.h
index b4eb2fc..13fa7e0 100644
--- a/image_header.h
+++ b/image_header.h
@@ -151,7 +151,7 @@ struct img_header_t {
uint16_t fov_y_end; ///< end y-cooredinate of current field of view (2 bytes)
uint8_t padding[452]; ///< padding bytes to fill header (452 bytes)
-} __packed__;
+} __o3000_packed__;
#endif // _IMAGE_HEADER_H
diff --git a/o3000_portable.h b/o3000_portable.h
index 4e7da6a..5489699 100644
--- a/o3000_portable.h
+++ b/o3000_portable.h
@@ -96,12 +96,16 @@ typedef unsigned __int64 uint64_t;
#if defined(_MSC_VER)
#define __func__ __FUNCTION__
-#define __packed__ __packed
+#define __o3000_packed__ __packed
+
+#elif defined(__APPLE__)
+
+#define __o3000_packed__ __attribute__ ((__packed__))
#else
/* define nothing for __func__ because it's used as default macro at source code */
-#define __packed__ __attribute__ ((packed))
+#define __o3000_packed__ __attribute__ ((packed))
#endif // defined(_MSC_VER)