Skip to content
This repository
Browse code

Renamed mac to bsd so we can target freebsd and netbsd.

  • Loading branch information...
commit a6f9136a8ce6fe5a221ada53004a1cd20a6b402c 1 parent 503bcf1
Unknown authored
6  src/mac_specific.c → src/bsd_specific.c
@@ -42,8 +42,10 @@
42 42
 
43 43
 #include <dbg.h>
44 44
 
45  
-// Wrapper function for sendfile that mac OS X uses
46  
-int mac_sendfile(int out_fd, int in_fd, off_t *offset, size_t count) {
  45
+/**
  46
+ * BSD version of sendfile, which is OSX and FreeBSD mostly.
  47
+ */
  48
+int bsd_sendfile(int out_fd, int in_fd, off_t *offset, size_t count) {
47 49
     off_t my_count = count;
48 50
     int rc;
49 51
 
2  src/mac_specific.h → src/bsd_specific.h
@@ -36,6 +36,6 @@
36 36
 #define _MAC_SPECIFIC_H
37 37
 #include <sys/types.h>
38 38
 
39  
-int mac_sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
  39
+int bsd_sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
40 40
 
41 41
 #endif
4  src/dir.h
@@ -38,7 +38,7 @@
38 38
 #include <stdlib.h>
39 39
 
40 40
 #if defined(__APPLE__) || defined(__FreeBSD__)
41  
-#include "mac_specific.h"
  41
+#include "bsd_specific.h"
42 42
 #else
43 43
 #include <sys/sendfile.h>
44 44
 #endif
@@ -93,7 +93,7 @@ void FileRecord_release(FileRecord *file);
93 93
 void FileRecord_destroy(FileRecord *file);
94 94
 
95 95
 #if defined(__APPLE__) || defined(__FreeBSD__)
96  
-#define Dir_send mac_sendfile
  96
+#define Dir_send bsd_sendfile
97 97
 #else
98 98
 #define Dir_send sendfile
99 99
 #endif

0 notes on commit a6f9136

Please sign in to comment.
Something went wrong with that request. Please try again.