I met a 'little' problem concerning multiple includes of the same header file:
Let's say I have the four files
The file 'user.h' holds the struct definition:
The file 'capture.h' holds the struct definition:
AES_KEY dkey; //Encryption key of the user
AES_KEY ekey; //Decryption key of the user
struct user *right;
struct user *left;
Now as I use 'AES_KEY' within the two structs, I have to include <openssl/aes.h> in the two header files, otherwise I get warnings when compiling?...So far that would be OK, there are no multiple includes of the same file till here.
AES_KEY dkey; //Key to decrypt the data
But let's assume that the file "capture.c" needs both "user.h" and "capture.h" included? I would have the file <openssl/aes.h> included two times. How should I avoid that? Is there some 'standard' way? Like using a void pointer to point to the actual encryption/decryption keys?