mirror of
https://github.com/coolsnowwolf/luci
synced 2025-01-07 07:06:41 +08:00
luci-lib-nixio: fixes compilation under GCC10/11
This commit is contained in:
parent
cd0ddb8a3c
commit
aa12cbf924
@ -152,7 +152,7 @@ int nixio__addr_write(nixio_addr *addr, struct sockaddr *saddr) {
|
||||
/**
|
||||
* netmask to prefix helper
|
||||
*/
|
||||
int nixio__addr_prefix(struct sockaddr *saddr) {
|
||||
static int nixio__addr_prefix(struct sockaddr *saddr) {
|
||||
int prefix = 0;
|
||||
size_t len;
|
||||
uint8_t *addr;
|
||||
|
@ -19,10 +19,6 @@
|
||||
#include "nixio.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
const char nixio__bin2hex[16] = {
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
|
||||
};
|
||||
|
||||
static unsigned char nixio__b64encode_tbl[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
|
@ -103,7 +103,9 @@ int nixio__mode_write(int mode, char *modestr);
|
||||
|
||||
int nixio__push_stat(lua_State *L, nixio_stat_t *buf);
|
||||
|
||||
const char nixio__bin2hex[16];
|
||||
static const char nixio__bin2hex[16] = {
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
|
||||
};
|
||||
|
||||
/* Module functions */
|
||||
void nixio_open_file(lua_State *L);
|
||||
|
Loading…
Reference in New Issue
Block a user