[riot-notifications] [RIOT-OS/RIOT] sys: add unaligned.h (header for alignment safe value-from-pointer functions) (#10797)

Kaspar Schleiser notifications at github.com
Fri Jan 25 22:21:11 CET 2019


kaspar030 commented on this pull request.



> + * @author      Kaspar Schleiser <kaspar at schleiser.de>
+ */
+
+#ifndef UNALIGNED_H
+#define UNALIGNED_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @brief Unaligned access helper struct (uint16_t version) */
+typedef struct {
+    uint16_t val;       /**< value */
+} __attribute__((packed)) uint16_una_t;

fixed

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10797#discussion_r251139794
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190125/3fe47610/attachment.html>


More information about the notifications mailing list