diff options
author | Guy McSwain <guy.mcswain@gmail.com> | 2020-08-30 10:39:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-30 10:39:20 -0500 |
commit | 8a49a4b07879090dd6cb395bc3995e271ef04987 (patch) | |
tree | afaf0651eb2a0576bcf6aabec958cf06571ea1ef | |
parent | b332474c9d7742f7a8b0d518f330674603747a12 (diff) | |
parent | ee593a2fc6d08eee8055b81b20ee97343122fbf5 (diff) |
Merge pull request #342 from hazuki0x0/fix-initPeripherals
Fix initPeripherals on Ubuntu 20.04 For security reasons, newer distros mount /dev with 'noexec' so mmap with
PROT_EXEC will no longer work (Operation not permitted).
-rw-r--r-- | pigpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7335,7 +7335,7 @@ static int initGrabLockFile(void) static uint32_t * initMapMem(int fd, uint32_t addr, uint32_t len) { return (uint32_t *) mmap(0, len, - PROT_READ|PROT_WRITE|PROT_EXEC, + PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, fd, addr); } |