summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-06-07 14:40:04 -0400
committerJune McEnroe <june@causal.agency>2020-06-07 14:40:04 -0400
commit3bc1e19932ae273377fd25ae9975ce1d9c3f565b (patch)
treef469ad4bb9c9cb7f388bab8ce81e1895de234298
parentAdd OpenBSD to install.sh (diff)
downloadsrc-3bc1e19932ae273377fd25ae9975ce1d9c3f565b.tar.gz
src-3bc1e19932ae273377fd25ae9975ce1d9c3f565b.zip
Call static_assert by _Static_assert
OpenBSD doesn't #define static_assert in assert.h and _Static_assert is
its real name I guess so why not?
-rw-r--r--bin/glitch.c3
-rw-r--r--bin/pngo.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/bin/glitch.c b/bin/glitch.c
index 536b35e1..e97ffce4 100644
--- a/bin/glitch.c
+++ b/bin/glitch.c
@@ -15,7 +15,6 @@
  */
 
 #include <arpa/inet.h>
-#include <assert.h>
 #include <err.h>
 #include <stdbool.h>
 #include <stdint.h>
@@ -125,7 +124,7 @@ static struct PACKED {
 	uint8_t filter;
 	uint8_t interlace;
 } header;
-static_assert(13 == sizeof(header), "header size");
+_Static_assert(13 == sizeof(header), "header size");
 
 static size_t pixelBits(void) {
 	switch (header.color) {
diff --git a/bin/pngo.c b/bin/pngo.c
index 17f2daa8..6c74297c 100644
--- a/bin/pngo.c
+++ b/bin/pngo.c
@@ -15,7 +15,6 @@
  */
 
 #include <arpa/inet.h>
-#include <assert.h>
 #include <err.h>
 #include <stdbool.h>
 #include <stdint.h>
@@ -134,7 +133,7 @@ static struct PACKED {
 	enum PACKED { Adaptive } filter;
 	enum PACKED { Progressive, Adam7 } interlace;
 } header;
-static_assert(13 == sizeof(header), "header size");
+_Static_assert(13 == sizeof(header), "header size");
 
 static size_t pixelBits(void) {
 	switch (header.color) {