AF_* constants are only available with the sockets extension
merged branch webfactory/fix-af-inet-define (PR #7535)

This PR was squashed before being merged into the master branch (closes #7535).

Discussion
----------

AF_* constants are only available with the sockets extension

Skip test if the extension is not available

Commits
-------

82e550b AF_* constants are only available with the sockets extension