c11.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 483bafb4179229714d920de49ba964170c212ef9 Mon Sep 17 00:00:00 2001
  2. From: Weida Hong <wdhongtw@gmail.com>
  3. Date: Thu, 29 Mar 2018 18:37:20 +0800
  4. Subject: [PATCH] Fix assertion related compile failure
  5. static_assert is declared in assert.h and should only be used after c11.
  6. ---
  7. xdelta3/Makefile.am | 2 +-
  8. xdelta3/xdelta3.h | 1 +
  9. 2 files changed, 2 insertions(+), 1 deletion(-)
  10. diff --git a/xdelta3/Makefile.am b/xdelta3/Makefile.am
  11. index 2280083..2d41213 100644
  12. --- a/xdelta3/Makefile.am
  13. +++ b/xdelta3/Makefile.am
  14. @@ -73,7 +73,7 @@ WFLAGS = -Wall -Wshadow -fno-builtin -Wextra -Wsign-compare \
  15. # -Wno-variadic-macros \
  16. # -Wno-c++98-compat-pedantic
  17. -C_WFLAGS = $(WFLAGS) -pedantic -std=c99
  18. +C_WFLAGS = $(WFLAGS) -pedantic -std=c11
  19. CXX_WFLAGS = $(WFLAGS) -pedantic -std=c++11
  20. common_CFLAGS = \
  21. diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h
  22. index 0c1ae0d..7d5e230 100644
  23. --- a/xdelta3/xdelta3.h
  24. +++ b/xdelta3/xdelta3.h
  25. @@ -32,6 +32,7 @@
  26. #include "config.h"
  27. #endif
  28. +#include <assert.h>
  29. #include <errno.h>
  30. #include <stdarg.h>
  31. #include <stddef.h>
  32. --
  33. 2.22.0