while writing a code for creating shared memory, I didn't find IPC_CREAT flag in the header file <sys/ipc.h>...when i open the ipc.h file no flags where defined i,e IPC_CREAT , IPC_PRIVATE and many more flags and structures were missing. but the thing is, I was able to execute the code (included IPC_CREAT flag) and it was running properly!
when i google ipc.h file, it consisted of all the flags and structures i needed!
note: i have already tried updating the my header file using sudo apt-get install linux-headers-$(uname -r). it didn't update any file as it was already updated to the latest.
now, i have 2 questions in my mind!!
- is this normal for header files to not have defined flags and we can execute programs with or without them?
- can i completely replace the file i found in google(ipc.h) in my system? does it work or will i be facing any issues in the future??
can anyone help me understand these above thing???