mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-15 09:54:33 +12:00
make it compile on macos (M1 - arm64). Does not run though
This commit is contained in:
parent
ab013b989b
commit
84a974695a
4
Makefile
4
Makefile
|
@ -81,8 +81,8 @@ OBJEXT := o
|
|||
#? Flags, Libraries and Includes
|
||||
override REQFLAGS := -std=c++20
|
||||
WARNFLAGS := -Wall -Wextra -pedantic
|
||||
OPTFLAGS ?= -O2 -ftree-loop-vectorize -flto=$(THREADS)
|
||||
LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector -fstack-clash-protection $(ADDFLAGS)
|
||||
OPTFLAGS ?= -O2 #-ftree-loop-vectorize -flto=$(THREADS)
|
||||
LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions $(ADDFLAGS)
|
||||
override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
|
||||
override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
|
||||
INC := -I$(INCDIR) -I$(SRCDIR)
|
||||
|
|
|
@ -225,7 +225,11 @@ void clean_quit(int sig) {
|
|||
|
||||
//? Assume error if still not cleaned up and call quick_exit to avoid a segfault from Tools::atomic_lock destructor
|
||||
if (Tools::active_locks > 0) {
|
||||
#ifdef __APPLE__
|
||||
exit((sig != -1 ? sig : 0));
|
||||
#else
|
||||
quick_exit((sig != -1 ? sig : 0));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (sig != -1) exit(sig);
|
||||
|
|
|
@ -32,6 +32,13 @@ tab-size = 4
|
|||
|
||||
using std::string, std::vector, std::atomic, std::to_string, std::regex, std::tuple, std::array;
|
||||
|
||||
#ifndef HOST_NAME_MAX
|
||||
#if defined(__APPLE__)
|
||||
#define HOST_NAME_MAX 255
|
||||
#else
|
||||
#define HOST_NAME_MAX 64
|
||||
#endif /* __APPLE__ */
|
||||
#endif /* HOST_NAME_MAX */
|
||||
|
||||
//? ------------------------------------------------- NAMESPACES ------------------------------------------------------
|
||||
|
||||
|
|
1628
src/osx/btop_collect.cpp
Normal file
1628
src/osx/btop_collect.cpp
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue