Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few minor patches for portability #413

Open
outpaddling opened this issue Nov 4, 2023 · 0 comments
Open

A few minor patches for portability #413

outpaddling opened this issue Nov 4, 2023 · 0 comments

Comments

@outpaddling
Copy link

--- ext/bifrost/src/strict_fstream.hpp.orig     2023-07-06 14:11:32 UTC
+++ ext/bifrost/src/strict_fstream.hpp
@@ -64,7 +64,7 @@ static std::string strerror()
     } else {
         return "Unknown error (" + std::to_string(err_num) + ")";
     }
-#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || defined(__APPLE__) || defined(__MUSL__)
+#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || defined(__APPLE__) || defined(__MUSL__) || defined(__FreeBSD__) || defined(__NetBSD__)
 // XSI-compliant strerror_r()
     const int err_num = errno; // See above
     if (strerror_r(err_num, buff.data(), buff.size()) == 0) {
--- src/Bootstrap.h.orig        2020-04-01 16:56:42 UTC
+++ src/Bootstrap.h
@@ -1,6 +1,7 @@
 #ifndef KALLISTO_BOOTSTRAP_H
 #define KALLISTO_BOOTSTRAP_H
 
+#include <sys/types.h>
 #include <mutex>
 #include <thread>
--- src/main.cpp.orig   2023-11-02 11:38:09 UTC
+++ src/main.cpp
@@ -11,6 +11,7 @@
 #include <limits>
 
 #include <cstdio>
+#include <unistd.h>    // rmdir()
 
 #include "common.h"
 #include "ProcessReads.h"

--- ext/bifrost/src/libpopcnt.h.orig    2023-07-24 12:34:08.037669065 +0000
+++ ext/bifrost/src/libpopcnt.h
@@ -32,6 +32,8 @@
 #ifndef LIBPOPCNT_H
 #define LIBPOPCNT_H
 
+#ifndef __NetBSD__
+
 #include <stdint.h>
 
 #ifndef __has_builtin
@@ -584,4 +586,6 @@ static inline uint64_t popcnt(const void
 
 #endif
 
+#endif /* NetBSD */
+
 #endif /* LIBPOPCNT_H */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant