introduce-birthdate-constant-for-reproducible-builds.patch 940 B

123456789101112131415161718192021222324
  1. Subject: Allow reproducible builds by introducing a BIRTHDATE constant
  2. Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
  3. Date: Tue Aug 25 18:03:23 2015 +0200
  4. Forwarded: http://arthur.barton.de/pipermail/ngircd-ml/2015-August/000819.html
  5. --- a/src/ngircd/irc-info.c
  6. +++ b/src/ngircd/irc-info.c
  7. @@ -556,7 +556,15 @@
  8. NGIRCd_Version))
  9. return DISCONNECTED;
  10. -#if defined(__DATE__) && defined(__TIME__)
  11. +#if defined(BIRTHDATE)
  12. + char t_str[60];
  13. + time_t t = BIRTHDATE;
  14. + (void)strftime(t_str, sizeof(t_str), "%a %b %d %Y at %H:%M:%S (%Z)",
  15. + localtime(&t));
  16. + snprintf(msg, sizeof(msg), "Birth Date: %s", t_str);
  17. + if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
  18. + return DISCONNECTED;
  19. +#elif defined(__DATE__) && defined(__TIME__)
  20. snprintf(msg, sizeof(msg), "Birth Date: %s at %s", __DATE__, __TIME__);
  21. if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
  22. return DISCONNECTED;