Created
December 3, 2020 06:19
-
-
Save lundman/f652d006386d34e4c19855ce35605848 to your computer and use it in GitHub Desktop.
Run oracbledb client libraries on illumos/OmniOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Solaris defines | |
* int shmget_osm(key_t key, size_t size, int shmflg, | |
* size_t granule_size); | |
* | |
* Which takes one additional argument "granule_size" to regular | |
* int shmget(key_t key, size_t size, int shmflg); | |
* | |
* This is a wrapper library to attempt to support it enough for | |
* Oracle DB client library to work. | |
* | |
* Compile: | |
* gcc -m64 -fPIC -shared -o shmget_osm.so shmget_osm.c | |
* Load: | |
* env LD_PRELOAD=/var/tmp/shmget_osm.so sqlplus (or other exe) | |
* - lundman | |
* | |
*/ | |
#include <sys/types.h> | |
#include <sys/ipc.h> | |
#include <sys/shm.h> | |
int | |
shmget_osm(key_t key, size_t size, int shmflg, size_t granule_size) | |
{ | |
return shmget(key, size, shmflg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment