Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/japanese/dams/files/patch-lib_openfile.cpp
18160 views
1
--- lib/openfile.cpp.orig 2015-12-25 14:22:43 UTC
2
+++ lib/openfile.cpp
3
@@ -53,7 +53,7 @@ int openfile(const char* fname) {
4
if (!pbase) {
5
pbase = mmap((caddr_t)0, st.st_size, PROT_READ, MAP_PRIVATE, fildes, 0);
6
onmemory = 0;
7
- if (pbase < 0) {
8
+ if (pbase == MAP_FAILED) {
9
/* mmap failed */
10
fprintf(stderr, "ERR: failed to execute mmap.\n");
11
return -1;
12
13