Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 797

Missing flag "IPC_CREAT" in header file ?

$
0
0

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!!

  1. is this normal for header files to not have defined flags and we can execute programs with or without them?
  2. 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???


Viewing all articles
Browse latest Browse all 797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>