chiark / gitweb /
core: always create /dev/kdbus/ns (and make it private 0700) after setting up the...
[elogind.git] / src / systemd / sd-shutdown.h
index b8f6a487ecdb391a8a5d7318e3cd6433b311d2e2..1d65549882cfe743848cef0b13e3e2b5bc0fa7ef 100644 (file)
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _sd_packed_
+#  define _sd_packed_ __attribute__((packed))
+#endif
+
 typedef enum sd_shutdown_mode {
         SD_SHUTDOWN_NONE = 0,
         SD_SHUTDOWN_REBOOT = 'r',
@@ -55,7 +63,7 @@ struct sd_shutdown_command {
         /* The wall message to send around. Leave empty for the
          * default wall message */
         char wall_message[];
-} __attribute__((packed));
+} _sd_packed_;
 
 /* The scheme is very simple:
  *
@@ -105,4 +113,8 @@ struct sd_shutdown_command {
  * anybody.
  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif