if ((suffix_len = strlen(suffix)) > 0) {
# if HAVE_MKSTEMPS
if ((fd = mkstemps(template, suffix_len)) < 0) { perror("mkstemps"); }
-# endif /* HAVE_MKSTEMPS */
+# else /* ! HAVE_MKSTEMPS */
+ fd = 0;
+# endif /* ! HAVE_MKSTEMPS */
} else {
if ((fd = mkstemp(template)) < 0) { perror("mkstemp"); }
}
tp += sizeof pattern - 1;
(void) strncpy(tp, suffix, suffix_len);
- tp += suffix_len;
+ /* tp += suffix_len; */
template[len-1] = '\0';