2017-08-22 07:25:50 +08:00
|
|
|
//===- FuzzerUtilLinux.cpp - Misc utils for Linux. ------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Misc utils for Linux.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "FuzzerDefs.h"
|
lib Fuzzer FreeBSD support
Summary: Patch by David CARLIER
Reviewers: vitalybuka, kcc, dim, emaste, davide, morehouse, george.karpenkov
Reviewed By: morehouse
Subscribers: george.karpenkov, kubamracek, srhines, mgorny, emaste, krytarowski
Differential Revision: https://reviews.llvm.org/D41642
llvm-svn: 322380
2018-01-13 01:15:05 +08:00
|
|
|
#if LIBFUZZER_LINUX || LIBFUZZER_NETBSD || LIBFUZZER_FREEBSD
|
2017-12-05 03:25:59 +08:00
|
|
|
#include "FuzzerCommand.h"
|
2017-08-22 07:25:50 +08:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
namespace fuzzer {
|
|
|
|
|
2017-12-05 03:25:59 +08:00
|
|
|
int ExecuteCommand(const Command &Cmd) {
|
|
|
|
std::string CmdLine = Cmd.toString();
|
|
|
|
return system(CmdLine.c_str());
|
2017-08-22 07:25:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace fuzzer
|
|
|
|
|
lib Fuzzer FreeBSD support
Summary: Patch by David CARLIER
Reviewers: vitalybuka, kcc, dim, emaste, davide, morehouse, george.karpenkov
Reviewed By: morehouse
Subscribers: george.karpenkov, kubamracek, srhines, mgorny, emaste, krytarowski
Differential Revision: https://reviews.llvm.org/D41642
llvm-svn: 322380
2018-01-13 01:15:05 +08:00
|
|
|
#endif // LIBFUZZER_LINUX || LIBFUZZER_NETBSD || LIBFUZZER_FREEBSD
|