    "[^/]+" ".."
    (substring
     (file-name-directory
-     (file-truename (or (and (string-prefix-p "/" cr-flymake-ninja-build-file)
+     (file-truename (or (and (cr-flymake-string-prefix-p
+                              "/" cr-flymake-ninja-build-file)
                              cr-flymake-ninja-build-file)
                         (concat (cr-flymake-chromium-src)
                                 cr-flymake-ninja-build-file))))


(defun cr-flymake-getfname (file-name-from-error-message)
  "Strip cruft from the passed-in filename to help flymake find the real file."
  (concat (cr-flymake-chromium-src)
          (substring file-name-from-error-message
                     (length (cr-flymake-from-build-to-src-root)))))

(defun cr-flymake-ninja-command-line ()
  "Return the command-line for running ninja, as a list of strings, or nil if

    ;; against, can't use cr-flymake-chromium-src here.  Instead we add a
    ;; generic regexp, but only to a buffer-local version of the variable.
    (set (make-local-variable 'flymake-allowed-file-name-masks)
         (list (list "\\.c\\(\\|c\\|pp\\)"
                     'cr-flymake-ninja-command-line
                     'ignore
                     'cr-flymake-getfname)))
    (flymake-find-file-hook)
    (if flymake-mode
