mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/boot/zlib: Replace static_assert() in zlib code
Replace static_assert() with STATIC_ASSERT macro from zt_common.h in order to get rid of glibc dependencies in zipl/boot and comply with older C standards. Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Suggested-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
8024f8e31a
commit
263d6950a1
@@ -115,7 +115,7 @@ typedef struct deflate_workspace {
|
||||
|
||||
#ifdef CONFIG_ZLIB_DFLTCC
|
||||
/* dfltcc_state must be doubleword aligned for DFLTCC call */
|
||||
static_assert(offsetof(struct deflate_workspace, dfltcc_memory) % 8 == 0);
|
||||
STATIC_ASSERT(offsetof(struct deflate_workspace, dfltcc_memory) % 8 == 0);
|
||||
#endif
|
||||
|
||||
/* Values for max_lazy_match, good_match and max_chain_length, depending on
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#ifndef DFLTCC_H
|
||||
#define DFLTCC_H
|
||||
|
||||
#include "defutil.h"
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
#include "lib/zt_common.h"
|
||||
#include "defutil.h"
|
||||
|
||||
/*
|
||||
* Tuning parameters.
|
||||
@@ -28,7 +28,7 @@ struct dfltcc_qaf_param {
|
||||
char reserved2[6];
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct dfltcc_qaf_param) == 32);
|
||||
STATIC_ASSERT(sizeof(struct dfltcc_qaf_param) == 32);
|
||||
|
||||
#define DFLTCC_FMT0 0
|
||||
|
||||
@@ -80,7 +80,7 @@ struct dfltcc_param_v0 {
|
||||
uint8_t csb[1152];
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct dfltcc_param_v0) == 1536);
|
||||
STATIC_ASSERT(sizeof(struct dfltcc_param_v0) == 1536);
|
||||
|
||||
#define CVT_CRC32 0
|
||||
#define CVT_ADLER32 1
|
||||
|
||||
Reference in New Issue
Block a user