--- ./makefile_orig	2026-05-04 23:25:01.703699505 -0400
+++ ./makefile	2026-05-05 00:22:34.718949760 -0400
@@ -5,13 +5,13 @@
 # 2024.08.19: -march=native isn't recognized on some platforms such as RISCV64.
 # Thus we removed it. Clang ARM users can add -march=armv8-a+crypto to enable
 # ARM NEON crypto.
-CXX=c++
-CXXFLAGS=-O2 -std=c++11 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
+CXX=c++ -pthread
+CXXFLAGS=-O2 -std=c++11 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else -D_LARGE_FILES
 LIBFLAGS=-fPIC
 DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
 STRIP=strip
 AR=ar
-LDFLAGS=-pthread
+LDFLAGS=-pthread -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -lbsd -Wl,-bmaxdata:0x80000000
 DESTDIR=/usr
 
 ##########################
