   let res2 = sem_unlink(semaphoreName)
   expectEqual(0, res2)
 }
+#endif
 
 // Fail because the file descriptor is invalid.
 POSIXTests.test("ioctl(CInt, UInt, CInt): fail") {

var POSIXTests = TestSuite("POSIXTests")

let semaphoreName = "TestSem"
let fn = "test.txt"

POSIXTests.setUp {
  sem_unlink(semaphoreName)

  let res2 = sem_unlink(semaphoreName)
  expectEqual(0, res2)
}
#endif

// Successful semaphore creation with O_EXCL.
#if !os(Android) // Android doesn’t implement sem_open and always return ENOSYS
POSIXTests.test("sem_open O_EXCL success") {
  let sem = sem_open(semaphoreName, O_CREAT | O_EXCL, 0o777, 1)
  expectNotEqual(SEM_FAILED, sem)
