                   ;; repository *and* have a new enough mtime.
                   (let ((newer-or-newermt nil)
                         (mtime-or-file nil))
-                    (pcase straight-find-flavor
-                      (`gnu/bsd
-                       (setq newer-or-newermt "-newermt")
-                       (setq mtime-or-file mtime))
-                      (`busybox
-                       (setq newer-or-newermt "-newer")
-                       (setq mtime-or-file (straight--make-mtime mtime)))
-                      (_ (error "Unexpected `straight-find-flavor': %S"
-                                straight-find-flavor)))
+                    (if (straight--find-supports 'newermt)
+                        (progn
+                          (setq newer-or-newermt "-newermt")
+                          (setq mtime-or-file mtime))
+                        (setq newer-or-newermt "-newer")
+                        (setq mtime-or-file (straight--make-mtime mtime)))
                     (push (straight--repos-dir local-repo) args-paths)
                     (setq args-primaries
                           (append (list "-o"

                          (concat
                           "Rebuilding all packages due to "
                           "build cache schema change"))))
                   ;; Find flavor should be the symbol currently in
                   ;; use.
                   (symbolp find-flavor)
                   (or (eq find-flavor straight-find-flavor)
                       (prog1 (setq malformed nil)
                         (message
                          (concat
                           "Rebuilding all packages due to "
                           "change in system find(1) utility"))))
                   ;; Emacs version should be the same as our current
                   ;; one.
                   (stringp last-emacs-version)

                  (with-temp-buffer
                    (let ((newer-or-newermt nil)
                          (mtime-or-file nil))
                      (if (straight--find-supports 'newermt)
                          (progn
                            (setq newer-or-newermt "-newermt")
                            (setq mtime-or-file last-mtime))
                        (setq newer-or-newermt "-newer")
                        (setq mtime-or-file
                              (straight--make-mtime last-mtime)))
                      (let* ((default-directory
                               (straight--repos-dir local-repo))
                             ;; This find(1) command ignores the .git
