[TD-13876]<fix>: forbid big-end machine.
This commit is contained in:
parent
9369a7a56d
commit
6667446db3
|
@ -33,6 +33,7 @@ typedef struct {
|
|||
SDiskSize size;
|
||||
} SDiskSpace;
|
||||
|
||||
bool taosCheckSystemIsSmallEnd();
|
||||
void taosGetSystemInfo();
|
||||
int32_t taosGetEmail(char *email, int32_t maxLen);
|
||||
int32_t taosGetOsReleaseName(char *releaseName, int32_t maxLen);
|
||||
|
|
|
@ -97,6 +97,11 @@ int32_t dmnRunDnode() {
|
|||
}
|
||||
|
||||
int main(int argc, char const *argv[]) {
|
||||
if (!taosCheckSystemIsSmallEnd()) {
|
||||
uError("TDengine does not run on non-small-end machines.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (dmnParseOption(argc, argv) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,15 @@
|
|||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
|
||||
bool taosCheckSystemIsSmallEnd() {
|
||||
union check{
|
||||
int16_t i;
|
||||
char ch[2];
|
||||
}c;
|
||||
c.i=1;
|
||||
return c.ch[0]==1;
|
||||
}
|
||||
|
||||
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue