Fix error codes.
[oweals/openssl.git] / apps / ca.c
index 68516ee9bd9ef4901ce4784fb42436bc1b0f1675..7bd229139ecc05c40ee59294436a63e4dbb9d58a 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -858,8 +858,8 @@ bad:
                        perror(outdir);
                        goto err;
                        }
-#ifdef S_IFDIR
-               if (!(sb.st_mode & S_IFDIR))
+#ifdef S_ISDIR
+               if (!S_ISDIR(sb.st_mode))
                        {
                        BIO_printf(bio_err,"%s need to be a directory\n",outdir);
                        perror(outdir);