Skip to content

C FFI Compilation bug #6

@dfordivam

Description

@dfordivam

For this code (from bytestring) clang gives error

foreign import ccall unsafe "static stdlib.h &free" c_free_finalizer
    :: FunPtr (Ptr Word8 -> IO ())


./ghc25458_0/ghc_4.hc:153:42: error: use of undeclared identifier 'free'
(W_)&base_GHCziPtr_FunPtr_con_info, (W_)&free

It is solved by adding the appropriate includes in ghc_4.hc

 #include <stdlib.h>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions