my_systemd.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. Copyright (c) 2015 Daniel Black. All rights reserved.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; version 2 of the License.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program; if not, write to the Free Software
  12. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  13. */
  14. #ifndef MY_SYSTEMD_INCLUDED
  15. #define MY_SYSTEMD_INCLUDED
  16. #if defined(HAVE_SYSTEMD) && !defined(EMBEDDED_LIBRARY)
  17. /*
  18. sd-daemon.h may include inttypes.h. Explicitly request format macros before
  19. the first inclusion of inttypes.h.
  20. */
  21. #define __STDC_FORMAT_MACROS
  22. #include <systemd/sd-daemon.h>
  23. #else
  24. #define sd_notify(X, Y)
  25. #define sd_notifyf(E, F, ...)
  26. #endif
  27. #endif /* MY_SYSTEMD_INCLUDED */