Patch for successfull compilation of minerd under FreeBSD:
Expanding on hangover's work; I had to also patch cpu-miner.c and util.c. Complete patch-set is:
Code:
diff -u cpuminer-0.7.1.orig/cpu-miner.c cpuminer-0.7.1/cpu-miner.c
--- cpuminer-0.7.1.orig/cpu-miner.c 2011-02-17 00:54:45.000000000 -0600
+++ cpuminer-0.7.1/cpu-miner.c 2011-03-03 23:38:39.000000000 -0600
@@ -24,7 +24,7 @@
#include <pthread.h>
#include <getopt.h>
#include <jansson.h>
-#include <curl/curl.h>
+#include </usr/local/include/curl/curl.h>
#include "compat.h"
#include "miner.h"
diff -u cpuminer-0.7.1.orig/miner.h cpuminer-0.7.1/miner.h
--- cpuminer-0.7.1.orig/miner.h 2011-02-17 00:20:34.000000000 -0600
+++ cpuminer-0.7.1/miner.h 2011-03-03 23:28:11.000000000 -0600
@@ -5,7 +5,7 @@
#include <stdint.h>
#include <sys/time.h>
#include <jansson.h>
-#include <curl/curl.h>
+#include </usr/local/include/curl/curl.h>
#ifdef __SSE2__
#define WANT_SSE2_4WAY 1
@@ -18,7 +18,12 @@
#if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define WANT_BUILTIN_BSWAP
#else
-#include <byteswap.h>
+/* #include <byteswap.h> */ // <-- doesn't exist under FreeBSD
+# define bswap_64 __bswap64
+# define bswap_32 __bswap32
+# define bswap_16 __bswap16
+# define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN)
+#include <sys/endian.h>
#endif
#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
Only in cpuminer-0.7.1: patch
diff -u cpuminer-0.7.1.orig/util.c cpuminer-0.7.1/util.c
--- cpuminer-0.7.1.orig/util.c 2011-03-02 21:06:20.000000000 -0600
+++ cpuminer-0.7.1/util.c 2011-03-03 23:42:56.000000000 -0600
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <string.h>
#include <jansson.h>
-#include <curl/curl.h>
+#include </usr/local/include/curl/curl.h>
#include "miner.h"
struct data_buffer {