diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2022-06-19 19:47:51 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2022-06-19 19:47:51 +0530 |
commit | 4fd287655a72b9aea14cdac715ad5b90ed082ed2 (patch) | |
tree | 65d393bc0e699dd12d05b29ba568e04cea666207 /circuitpython/lib/berkeley-db-1.xx/PORT/linux/OTHER_PATCHES | |
parent | 0150f70ce9c39e9e6dd878766c0620c85e47bed0 (diff) |
add circuitpython code
Diffstat (limited to 'circuitpython/lib/berkeley-db-1.xx/PORT/linux/OTHER_PATCHES')
-rw-r--r-- | circuitpython/lib/berkeley-db-1.xx/PORT/linux/OTHER_PATCHES | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/circuitpython/lib/berkeley-db-1.xx/PORT/linux/OTHER_PATCHES b/circuitpython/lib/berkeley-db-1.xx/PORT/linux/OTHER_PATCHES new file mode 100644 index 0000000..b0387a5 --- /dev/null +++ b/circuitpython/lib/berkeley-db-1.xx/PORT/linux/OTHER_PATCHES @@ -0,0 +1,29 @@ +*** PORT/db/recno/rec_open.c.orig 1993/10/13 02:01:31 +--- PORT/db/recno/rec_open.c 1993/10/13 02:20:47 +*************** +*** 159,167 **** +--- 159,182 ---- + SET(t, R_EOF); + else { + t->bt_msize = sb.st_size; ++ /* ++ * hack : ++ * ++ * The Linux kernel mmap() semantics are broken : ++ * ++ * Under Linux, read only private mappings cause write only and read/write ++ * opens to fail with errno=ETXTBSY. Shared read only mappings should work ++ * fine though, but I'm not familiar enough with the code to ascertain that ++ * a MAP_SHARED mapping would be safe so I use the non-mmap'd version ++ * instead. ++ * ++ */ ++ ++ #if !defined(linux) + if ((t->bt_smap = mmap(NULL, t->bt_msize, + PROT_READ, MAP_PRIVATE, rfd, + (off_t)0)) == (caddr_t)-1) ++ #endif + goto slow; + t->bt_cmap = t->bt_smap; + t->bt_emap = t->bt_smap + sb.st_size; |