Making the following change:
{#fun c_shm_create as c_shmCreate { `String' , `Int' } -> `Ptr ()' id #}
I'm unsure if this is a bug or is intentional. A Haskell data type and C struct may be considered 'equal' in that they represent the same data, but are not represented the same (the struct is pure bytes on the heap while the datatype is pointers and such) so you will need a marshaling function that isn't just id
.