Skip to content

Commit

Permalink
Fixed errors in Makefiles for Linux and MingW (plus extra #include in…
Browse files Browse the repository at this point in the history
… elf.c).
  • Loading branch information
compuphase committed Apr 20, 2022
1 parent e95ae6d commit 402584d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/Makefile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ bmscan : $(OBJLIST_BMSCAN)
$(LNK) $(LFLAGS) -o$@ $^ -lbsd -lpthread

elf-postlink : $(OBJLIST_POSTLINK)
$(LNK) $(LFLAGS) -o$@ $^
$(LNK) $(LFLAGS) -o$@ $^ -lbsd

tracegen : $(OBJLIST_TRACEGEN)
$(LNK) $(LFLAGS) -o$@ $^ -lbsd
Expand Down
2 changes: 1 addition & 1 deletion source/Makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ OBJLIST_BMTRACE = bmtrace.o bmcommon.o bmp-scan.o bmp-script.o bmp-support.o \

OBJLIST_BMSCAN = bmscan.o bmp-scan.o tcpip.o

OBJLIST_POSTLINK = elf-postlink.o elf.o
OBJLIST_POSTLINK = elf-postlink.o elf.o strlcpy.o

OBJLIST_TRACEGEN = tracegen.o parsetsdl.o strlcpy.o

Expand Down
2 changes: 1 addition & 1 deletion source/Makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ OBJLIST_BMTRACE = bmtrace.obj bmcommon.obj bmp-scan.obj bmp-script.obj bmp-suppo

OBJLIST_BMSCAN = bmscan.obj bmp-scan.obj tcpip.obj

OBJLIST_POSTLINK = elf-postlink.obj elf.obj
OBJLIST_POSTLINK = elf-postlink.obj elf.obj strlcpy.obj

OBJLIST_TRACEGEN = tracegen.obj parsetsdl.obj strlcpy.obj

Expand Down
7 changes: 7 additions & 0 deletions source/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
#include <stdlib.h>
#include <string.h>
#include "elf.h"
#if defined WIN32 || defined _WIN32
#if defined __MINGW32__ || defined __MINGW64__ || defined _MSC_VER
#include "strlcpy.h"
#endif
#elif defined __linux__
#include <bsd/string.h>
#endif

#if defined __GNUC__
#define PACKED __attribute__((packed))
Expand Down

0 comments on commit 402584d

Please sign in to comment.