X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsystemd%2Fsd-shutdown.h;h=1d65549882cfe743848cef0b13e3e2b5bc0fa7ef;hb=f01de9656d0969633ac89eb57a0ba4658a100568;hp=b8f6a487ecdb391a8a5d7318e3cd6433b311d2e2;hpb=a63c198cc0ac9113efca5450309b21011cadfe29;p=elogind.git diff --git a/src/systemd/sd-shutdown.h b/src/systemd/sd-shutdown.h index b8f6a487e..1d6554988 100644 --- a/src/systemd/sd-shutdown.h +++ b/src/systemd/sd-shutdown.h @@ -26,6 +26,14 @@ #include +#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