File tree Expand file tree Collapse file tree 4 files changed +27
-7
lines changed Expand file tree Collapse file tree 4 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 1
1
CC = clang
2
2
STRIP = strip
3
- OBJS = pseudo_node.o sha256.o
4
- CFLAGS = -std=gnu99 -DMACOSX -O2 -Wall -Wno-unused-value
5
- CLIBS = -lpthread
3
+ OBJS = pseudo_node.o
4
+ CFLAGS = -std=gnu99 -DMACOSX -O2 -Wall -Wno-unused-value -fpic
5
+ CLIBS = -lpthread -ldl -Wl,-rpath -Wl,.
6
6
7
- pseudonode: $(OBJS)
8
- $(CC) $(CFLAGS) -o pseudonode $(OBJS) $(CLIBS)
7
+ pseudonode: libpseudonode.dylib main.o
8
+ $(CC) $(CFLAGS) -o pseudonode main.o $(CLIBS) -L. libpseudonode.dylib
9
9
$(STRIP) pseudonode
10
10
cp pseudonode pseudonode.macosx
11
11
12
+ libpseudonode.dylib: $(OBJS)
13
+ $(CC) -shared -o libpseudonode.dylib $(OBJS)
14
+
12
15
clean:
13
- rm -f $(OBJS) pseduonode
16
+ rm -f $(OBJS) main.o
14
17
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ CC = clang
2
2
STRIP = strip
3
3
OBJS = txmon.o
4
4
CFLAGS = -std=gnu99 -DLINUX -I../../ -O2 -Wall -Wno-unused-value -fpic
5
- CLIBS = -L ../../ -lpseudonode -lpthread -ldl -Wl,-R.
5
+ CLIBS = -L ../../ -lpseudonode -lpthread -ldl -Wl,-rpath -Wl,.
6
6
7
7
txmon: txmon.o
8
8
$(CC) $(CFLAGS) -o txmon $(OBJS) $(CLIBS)
Original file line number Diff line number Diff line change @@ -898,6 +898,10 @@ int main(int argc, char **argv)
898
898
if (!isatty (1 ))
899
899
option_color = false;
900
900
901
+ #ifdef LINUX
902
+ signal (SIGPIPE , SIG_IGN );
903
+ #endif
904
+
901
905
struct PN_callbacks CALLBACKS ;
902
906
memset (& CALLBACKS , 0 , sizeof (CALLBACKS ));
903
907
CALLBACKS .tx = tx_callback ;
Original file line number Diff line number Diff line change 39
39
#include <setjmp.h>
40
40
#include <getopt.h>
41
41
42
+ #ifdef MACOSX
43
+ #define LINUX
44
+ #endif
45
+
42
46
#ifdef LINUX
43
47
#include <pwd.h>
44
48
#include <arpa/inet.h>
49
+
50
+ #ifdef MACOSX
51
+ #define s6_addr16 __u6_addr.__u6_addr16
52
+ #endif
53
+
45
54
#endif /* LINUX */
46
55
47
56
#ifdef WINDOWS
@@ -234,6 +243,10 @@ int main(int argc, char **argv)
234
243
return EXIT_FAILURE ;
235
244
}
236
245
246
+ #ifdef LINUX
247
+ signal (SIGPIPE , SIG_IGN );
248
+ #endif
249
+
237
250
struct PN_config CONFIG ;
238
251
memset (& CONFIG , 0 , sizeof (CONFIG ));
239
252
CONFIG .user_agent = USER_AGENT ;
You can’t perform that action at this time.
0 commit comments