Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/biology/bedtools/files/patch-src_utils_BamTools_include_SamHeader.hpp
16461 views
1
--- src/utils/BamTools/include/SamHeader.hpp.orig 2021-01-24 16:15:06 UTC
2
+++ src/utils/BamTools/include/SamHeader.hpp
3
@@ -7,6 +7,7 @@
4
#include <string.h>
5
#include <api/BamAux.h>
6
#include <stdlib.h>
7
+#include <sysexits.h>
8
9
10
#ifdef WITH_HTS_CB_API
11
@@ -29,7 +30,11 @@ namespace htslib_future {
12
ops.cb_data = buffer;
13
samFile* fp = hts_open_callback(NULL, &ops, "w");
14
15
- sam_hdr_write(fp, hdr);
16
+ if ( sam_hdr_write(fp, hdr) != 0 )
17
+ {
18
+ fputs("sam_hdr_rebuild: Error: sam_hdr_write() failed.\n", stderr);
19
+ exit(EX_IOERR);
20
+ }
21
22
hts_close(fp);
23
24
25