Skip to content

Commit

Permalink
[Linux] Import shared memory functions from librt.so.1
Browse files Browse the repository at this point in the history
More recent Ubuntu versions seem to be missing symlinks that map
librt.so to a specific version.
  • Loading branch information
hyazinthh committed Mar 10, 2022
1 parent fe01c58 commit 571500b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Aardvark.Service/Server.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ module SharedMemory =
| WriteOnly = 0x1
| ReadWrite = 0x2

[<DllImport("librt", CharSet = CharSet.Ansi, SetLastError=true, EntryPoint="shm_open")>]
[<DllImport("librt.so.1", CharSet = CharSet.Ansi, SetLastError=true, EntryPoint="shm_open")>]
extern FileHandle shmopen(string name, SharedMemoryFlags oflag, Permission mode)

[<DllImport("libc", CharSet = CharSet.Ansi, SetLastError=true)>]
Expand All @@ -1564,7 +1564,7 @@ module SharedMemory =
[<DllImport("libc", CharSet = CharSet.Ansi, SetLastError=true)>]
extern int munmap(nativeint ptr, unativeint size)

[<DllImport("librt", CharSet = CharSet.Ansi, SetLastError=true, EntryPoint="shm_unlink")>]
[<DllImport("librt.so.1", CharSet = CharSet.Ansi, SetLastError=true, EntryPoint="shm_unlink")>]
extern int shmunlink(string name)

[<DllImport("libc", CharSet = CharSet.Ansi, SetLastError=true)>]
Expand Down

0 comments on commit 571500b

Please sign in to comment.