Skip to content

Commit 0fa15fe

Browse files
committed
build: resolve mapierr.hpp build failure under -DCOMPILE_DIAG
``` mapierr.hpp:439:18: error: variable ‘GX_EXPORT ec_error_t’ has initializer but incomplete type 439 | struct GX_EXPORT ec_error_t { ``` Fixes: gromox-2.44-97-g5bcce22bf
1 parent c4d30cb commit 0fa15fe

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

include/gromox/defs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#endif
99
#include <string>
1010
#include <type_traits>
11-
#include <gromox/mapierr.hpp>
1211
#define FMODE_PRIVATE 0660U
1312
#define FMODE_PUBLIC 0666U
1413
#define SOCKET_TIMEOUT 60
@@ -32,6 +31,8 @@
3231
inline bool empty() const { return (count) == 0; } \
3332
inline void push_back(const value_type &v) { (memb)[(count)++] = v; }
3433

34+
#include <gromox/mapierr.hpp>
35+
3536
/*
3637
* The timezone column in the user database ought to be never empty. Having an
3738
* unusual fallback offset means that missing TZ problems will readily be

lib/rfbl.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,12 @@ errno_t canonical_hostname(std::string &out) try
17871787

17881788
int ece2nerrno(ec_error_t e)
17891789
{
1790-
switch (e) {
1790+
#ifdef COMPILE_DIAG
1791+
switch (static_cast<uint32_t>(e))
1792+
#else
1793+
switch (e)
1794+
#endif
1795+
{
17911796
case ecSuccess: return 0;
17921797
case ecMAPIOOM: [[fallthrough]];
17931798
case ecServerOOM: return -ENOMEM;

0 commit comments

Comments
 (0)