Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
226166bdaf | ||
|
|
80fa72cabc | ||
|
|
d976d159d0 | ||
|
|
84ca7fcf40 | ||
|
|
f120a6aab0 | ||
|
|
0d8108d8da | ||
|
|
e072ebee58 | ||
|
|
c6767d9007 | ||
|
|
bb5760cca4 | ||
|
|
26b7971ba6 | ||
|
|
b286ede3c6 | ||
|
|
4ef7afe3ca | ||
|
|
377f2f0496 | ||
|
|
7ed5893fc6 | ||
|
|
e70c397e54 | ||
|
|
6a6be9edde | ||
|
|
37f8500fe6 | ||
|
|
207f82dd9d |
@@ -112,6 +112,6 @@ class Keychain {
|
|||||||
static func verifyReference(called ref: Data) -> Bool {
|
static func verifyReference(called ref: Data) -> Bool {
|
||||||
return SecItemCopyMatching([kSecClass as String: kSecClassGenericPassword,
|
return SecItemCopyMatching([kSecClass as String: kSecClassGenericPassword,
|
||||||
kSecValuePersistentRef as String: ref] as CFDictionary,
|
kSecValuePersistentRef as String: ref] as CFDictionary,
|
||||||
nil) == errSecSuccess
|
nil) != errSecItemNotFound
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ extension NETunnelProviderProtocol {
|
|||||||
if passwordReference == nil {
|
if passwordReference == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
#if os(macOS)
|
||||||
|
providerConfiguration = ["UID": getuid()]
|
||||||
|
#endif
|
||||||
|
|
||||||
let endpoints = tunnelConfiguration.peers.compactMap { $0.endpoint }
|
let endpoints = tunnelConfiguration.peers.compactMap { $0.endpoint }
|
||||||
if endpoints.count == 1 {
|
if endpoints.count == 1 {
|
||||||
@@ -60,11 +63,25 @@ extension NETunnelProviderProtocol {
|
|||||||
* in the keychain. But it's still useful to keep the migration
|
* in the keychain. But it's still useful to keep the migration
|
||||||
* around so that .mobileconfig files are easier.
|
* around so that .mobileconfig files are easier.
|
||||||
*/
|
*/
|
||||||
guard let oldConfig = providerConfiguration?["WgQuickConfig"] as? String else { return false }
|
if let oldConfig = providerConfiguration?["WgQuickConfig"] as? String {
|
||||||
|
#if os(macOS)
|
||||||
|
providerConfiguration = ["UID": getuid()]
|
||||||
|
#elseif os(iOS)
|
||||||
providerConfiguration = nil
|
providerConfiguration = nil
|
||||||
|
#else
|
||||||
|
#error("Unimplemented")
|
||||||
|
#endif
|
||||||
guard passwordReference == nil else { return true }
|
guard passwordReference == nil else { return true }
|
||||||
wg_log(.debug, message: "Migrating tunnel configuration '\(name)'")
|
wg_log(.debug, message: "Migrating tunnel configuration '\(name)'")
|
||||||
passwordReference = Keychain.makeReference(containing: oldConfig, called: name)
|
passwordReference = Keychain.makeReference(containing: oldConfig, called: name)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
#if os(macOS)
|
||||||
|
if passwordReference != nil && providerConfiguration?["UID"] == nil && verifyConfigurationReference() {
|
||||||
|
providerConfiguration = ["UID": getuid()]
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ extension TunnelConfiguration {
|
|||||||
var interfaceConfiguration: InterfaceConfiguration?
|
var interfaceConfiguration: InterfaceConfiguration?
|
||||||
var peerConfigurations = [PeerConfiguration]()
|
var peerConfigurations = [PeerConfiguration]()
|
||||||
|
|
||||||
let lines = wgQuickConfig.split(separator: "\n")
|
let lines = wgQuickConfig.split { $0.isNewline }
|
||||||
|
|
||||||
var parserState = ParserState.notInASection
|
var parserState = ParserState.notInASection
|
||||||
var attributes = [String: String]()
|
var attributes = [String: String]()
|
||||||
|
|||||||
@@ -413,8 +413,6 @@
|
|||||||
|
|
||||||
"macAppExitingWithActiveTunnelMessage" = "WireGuard is exiting with an active tunnel";
|
"macAppExitingWithActiveTunnelMessage" = "WireGuard is exiting with an active tunnel";
|
||||||
"macAppExitingWithActiveTunnelInfo" = "The tunnel will remain active after exiting. You may disable it by reopening this application or through the Network panel in System Preferences.";
|
"macAppExitingWithActiveTunnelInfo" = "The tunnel will remain active after exiting. You may disable it by reopening this application or through the Network panel in System Preferences.";
|
||||||
"macPrivacyNoticeMessage" = "Privacy notice: be sure you trust this configuration file";
|
|
||||||
"macPrivacyNoticeInfo" = "You will be prompted by the system to allow or disallow adding a VPN configuration. While this application does not send any information to the WireGuard project, information is by design sent to the servers specified inside of the configuration file you have just added, which configures your computer to use those servers as a VPN. Be certain that you trust this configuration before clicking “Allow” in the following dialog.";
|
|
||||||
|
|
||||||
// Mac tooltip
|
// Mac tooltip
|
||||||
|
|
||||||
@@ -439,3 +437,7 @@
|
|||||||
"macAppStoreUpdatingAlertMessage" = "App Store would like to update WireGuard";
|
"macAppStoreUpdatingAlertMessage" = "App Store would like to update WireGuard";
|
||||||
"macAppStoreUpdatingAlertInfoWithOnDemand (%@)" = "Please disable on-demand for tunnel ‘%@’, deactivate it, and then continue updating in App Store.";
|
"macAppStoreUpdatingAlertInfoWithOnDemand (%@)" = "Please disable on-demand for tunnel ‘%@’, deactivate it, and then continue updating in App Store.";
|
||||||
"macAppStoreUpdatingAlertInfoWithoutOnDemand (%@)" = "Please deactivate tunnel ‘%@’ and then continue updating in App Store.";
|
"macAppStoreUpdatingAlertInfoWithoutOnDemand (%@)" = "Please deactivate tunnel ‘%@’ and then continue updating in App Store.";
|
||||||
|
|
||||||
|
// Donation
|
||||||
|
|
||||||
|
"donateLink" = "♥ Donate to the WireGuard Project";
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
VERSION_NAME = 0.0.20190609
|
VERSION_NAME = 0.0.20191012
|
||||||
VERSION_ID = 11
|
VERSION_ID = 14
|
||||||
|
|||||||
@@ -46,46 +46,59 @@ extension ActivateOnDemandOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(from tunnelProviderManager: NETunnelProviderManager) {
|
init(from tunnelProviderManager: NETunnelProviderManager) {
|
||||||
let rules = tunnelProviderManager.onDemandRules ?? []
|
if tunnelProviderManager.isOnDemandEnabled, let onDemandRules = tunnelProviderManager.onDemandRules {
|
||||||
let activateOnDemandOption: ActivateOnDemandOption
|
self = ActivateOnDemandOption.create(from: onDemandRules)
|
||||||
|
} else {
|
||||||
|
self = .off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static func create(from rules: [NEOnDemandRule]) -> ActivateOnDemandOption {
|
||||||
switch rules.count {
|
switch rules.count {
|
||||||
case 0:
|
case 0:
|
||||||
activateOnDemandOption = .off
|
return .off
|
||||||
case 1:
|
case 1:
|
||||||
let rule = rules[0]
|
let rule = rules[0]
|
||||||
precondition(rule.action == .connect)
|
guard rule.action == .connect else { return .off }
|
||||||
activateOnDemandOption = .anyInterface(.anySSID)
|
return .anyInterface(.anySSID)
|
||||||
case 2:
|
case 2:
|
||||||
let connectRule = rules.first(where: { $0.action == .connect })!
|
guard let connectRule = rules.first(where: { $0.action == .connect }) else {
|
||||||
let disconnectRule = rules.first(where: { $0.action == .disconnect })!
|
wg_log(.error, message: "Unexpected onDemandRules set on tunnel provider manager: \(rules.count) rules found but no connect rule.")
|
||||||
|
return .off
|
||||||
|
}
|
||||||
|
guard let disconnectRule = rules.first(where: { $0.action == .disconnect }) else {
|
||||||
|
wg_log(.error, message: "Unexpected onDemandRules set on tunnel provider manager: \(rules.count) rules found but no disconnect rule.")
|
||||||
|
return .off
|
||||||
|
}
|
||||||
if connectRule.interfaceTypeMatch == .wiFi && disconnectRule.interfaceTypeMatch == nonWiFiInterfaceType {
|
if connectRule.interfaceTypeMatch == .wiFi && disconnectRule.interfaceTypeMatch == nonWiFiInterfaceType {
|
||||||
activateOnDemandOption = .wiFiInterfaceOnly(.anySSID)
|
return .wiFiInterfaceOnly(.anySSID)
|
||||||
} else if connectRule.interfaceTypeMatch == nonWiFiInterfaceType && disconnectRule.interfaceTypeMatch == .wiFi {
|
} else if connectRule.interfaceTypeMatch == nonWiFiInterfaceType && disconnectRule.interfaceTypeMatch == .wiFi {
|
||||||
activateOnDemandOption = .nonWiFiInterfaceOnly
|
return .nonWiFiInterfaceOnly
|
||||||
} else {
|
} else {
|
||||||
fatalError("Unexpected onDemandRules set on tunnel provider manager")
|
wg_log(.error, message: "Unexpected onDemandRules set on tunnel provider manager: \(rules.count) rules found but interface types are inconsistent.")
|
||||||
|
return .off
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
let ssidRule = rules.first(where: { $0.interfaceTypeMatch == .wiFi && $0.ssidMatch != nil })!
|
guard let ssidRule = rules.first(where: { $0.interfaceTypeMatch == .wiFi && $0.ssidMatch != nil }) else { return .off }
|
||||||
let nonWiFiRule = rules.first(where: { $0.interfaceTypeMatch == nonWiFiInterfaceType })!
|
guard let nonWiFiRule = rules.first(where: { $0.interfaceTypeMatch == nonWiFiInterfaceType }) else { return .off }
|
||||||
let ssids = ssidRule.ssidMatch!
|
let ssids = ssidRule.ssidMatch!
|
||||||
switch (ssidRule.action, nonWiFiRule.action) {
|
switch (ssidRule.action, nonWiFiRule.action) {
|
||||||
case (.connect, .connect):
|
case (.connect, .connect):
|
||||||
activateOnDemandOption = .anyInterface(.onlySpecificSSIDs(ssids))
|
return .anyInterface(.onlySpecificSSIDs(ssids))
|
||||||
case (.connect, .disconnect):
|
case (.connect, .disconnect):
|
||||||
activateOnDemandOption = .wiFiInterfaceOnly(.onlySpecificSSIDs(ssids))
|
return .wiFiInterfaceOnly(.onlySpecificSSIDs(ssids))
|
||||||
case (.disconnect, .connect):
|
case (.disconnect, .connect):
|
||||||
activateOnDemandOption = .anyInterface(.exceptSpecificSSIDs(ssids))
|
return .anyInterface(.exceptSpecificSSIDs(ssids))
|
||||||
case (.disconnect, .disconnect):
|
case (.disconnect, .disconnect):
|
||||||
activateOnDemandOption = .wiFiInterfaceOnly(.exceptSpecificSSIDs(ssids))
|
return .wiFiInterfaceOnly(.exceptSpecificSSIDs(ssids))
|
||||||
default:
|
default:
|
||||||
fatalError("Unexpected SSID onDemandRules set on tunnel provider manager")
|
wg_log(.error, message: "Unexpected onDemandRules set on tunnel provider manager: \(rules.count) rules found")
|
||||||
|
return .off
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
fatalError("Unexpected number of onDemandRules set on tunnel provider manager")
|
wg_log(.error, message: "Unexpected number of onDemandRules set on tunnel provider manager: \(rules.count) rules found")
|
||||||
|
return .off
|
||||||
}
|
}
|
||||||
|
|
||||||
self = activateOnDemandOption
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,13 +58,19 @@ class TunnelsManager {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
let passwordRef = proto.verifyConfigurationReference() ? proto.passwordReference : nil
|
let passwordRef = proto.verifyConfigurationReference() ? proto.passwordReference : nil
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
let passwordRef = proto.passwordReference // To handle multiple users in macOS, we skip verifying
|
let passwordRef: Data?
|
||||||
|
if proto.providerConfiguration?["UID"] as? uid_t == getuid() {
|
||||||
|
passwordRef = proto.verifyConfigurationReference() ? proto.passwordReference : nil
|
||||||
|
} else {
|
||||||
|
passwordRef = proto.passwordReference // To handle multiple users in macOS, we skip verifying
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#error("Unimplemented")
|
#error("Unimplemented")
|
||||||
#endif
|
#endif
|
||||||
if let ref = passwordRef {
|
if let ref = passwordRef {
|
||||||
refs.insert(ref)
|
refs.insert(ref)
|
||||||
} else {
|
} else {
|
||||||
|
wg_log(.info, message: "Removing orphaned tunnel with non-verifying keychain entry: \(tunnelManager.localizedDescription ?? "<unknown>")")
|
||||||
tunnelManager.removeFromPreferences { _ in }
|
tunnelManager.removeFromPreferences { _ in }
|
||||||
tunnelManagers.remove(at: index)
|
tunnelManagers.remove(at: index)
|
||||||
}
|
}
|
||||||
@@ -262,10 +268,15 @@ class TunnelsManager {
|
|||||||
|
|
||||||
func remove(tunnel: TunnelContainer, completionHandler: @escaping (TunnelsManagerError?) -> Void) {
|
func remove(tunnel: TunnelContainer, completionHandler: @escaping (TunnelsManagerError?) -> Void) {
|
||||||
let tunnelProviderManager = tunnel.tunnelProvider
|
let tunnelProviderManager = tunnel.tunnelProvider
|
||||||
if tunnel.isTunnelConfigurationAvailableInKeychain {
|
#if os(macOS)
|
||||||
|
if tunnel.isTunnelAvailableToUser {
|
||||||
(tunnelProviderManager.protocolConfiguration as? NETunnelProviderProtocol)?.destroyConfigurationReference()
|
(tunnelProviderManager.protocolConfiguration as? NETunnelProviderProtocol)?.destroyConfigurationReference()
|
||||||
}
|
}
|
||||||
|
#elseif os(iOS)
|
||||||
|
(tunnelProviderManager.protocolConfiguration as? NETunnelProviderProtocol)?.destroyConfigurationReference()
|
||||||
|
#else
|
||||||
|
#error("Unimplemented")
|
||||||
|
#endif
|
||||||
tunnelProviderManager.removeFromPreferences { [weak self] error in
|
tunnelProviderManager.removeFromPreferences { [weak self] error in
|
||||||
guard error == nil else {
|
guard error == nil else {
|
||||||
wg_log(.error, message: "Remove: Saving configuration failed: \(error!)")
|
wg_log(.error, message: "Remove: Saving configuration failed: \(error!)")
|
||||||
@@ -493,14 +504,16 @@ class TunnelContainer: NSObject {
|
|||||||
return tunnelProvider.tunnelConfiguration
|
return tunnelProvider.tunnelConfiguration
|
||||||
}
|
}
|
||||||
|
|
||||||
var isTunnelConfigurationAvailableInKeychain: Bool {
|
|
||||||
return tunnelProvider.isTunnelConfigurationAvailableInKeychain
|
|
||||||
}
|
|
||||||
|
|
||||||
var onDemandOption: ActivateOnDemandOption {
|
var onDemandOption: ActivateOnDemandOption {
|
||||||
return ActivateOnDemandOption(from: tunnelProvider)
|
return ActivateOnDemandOption(from: tunnelProvider)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if os(macOS)
|
||||||
|
var isTunnelAvailableToUser: Bool {
|
||||||
|
return (tunnelProvider.protocolConfiguration as? NETunnelProviderProtocol)?.providerConfiguration?["UID"] as? uid_t == getuid()
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
init(tunnel: NETunnelProviderManager) {
|
init(tunnel: NETunnelProviderManager) {
|
||||||
name = tunnel.localizedDescription ?? "Unnamed"
|
name = tunnel.localizedDescription ?? "Unnamed"
|
||||||
let status = TunnelStatus(from: tunnel.connection.status)
|
let status = TunnelStatus(from: tunnel.connection.status)
|
||||||
@@ -609,18 +622,8 @@ class TunnelContainer: NSObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension NETunnelProviderManager {
|
extension NETunnelProviderManager {
|
||||||
private static var cachedIsConfigAvailableInKeychainKey: UInt8 = 0
|
|
||||||
private static var cachedConfigKey: UInt8 = 0
|
private static var cachedConfigKey: UInt8 = 0
|
||||||
|
|
||||||
var isTunnelConfigurationAvailableInKeychain: Bool {
|
|
||||||
if let cachedNumber = objc_getAssociatedObject(self, &NETunnelProviderManager.cachedIsConfigAvailableInKeychainKey) as? NSNumber {
|
|
||||||
return cachedNumber.boolValue
|
|
||||||
}
|
|
||||||
let isAvailable = (protocolConfiguration as? NETunnelProviderProtocol)?.verifyConfigurationReference() ?? false
|
|
||||||
objc_setAssociatedObject(self, &NETunnelProviderManager.cachedIsConfigAvailableInKeychainKey, NSNumber(value: isAvailable), objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
|
|
||||||
return isAvailable
|
|
||||||
}
|
|
||||||
|
|
||||||
var tunnelConfiguration: TunnelConfiguration? {
|
var tunnelConfiguration: TunnelConfiguration? {
|
||||||
if let cached = objc_getAssociatedObject(self, &NETunnelProviderManager.cachedConfigKey) as? TunnelConfiguration {
|
if let cached = objc_getAssociatedObject(self, &NETunnelProviderManager.cachedConfigKey) as? TunnelConfiguration {
|
||||||
return cached
|
return cached
|
||||||
@@ -636,17 +639,9 @@ extension NETunnelProviderManager {
|
|||||||
protocolConfiguration = NETunnelProviderProtocol(tunnelConfiguration: tunnelConfiguration, previouslyFrom: protocolConfiguration)
|
protocolConfiguration = NETunnelProviderProtocol(tunnelConfiguration: tunnelConfiguration, previouslyFrom: protocolConfiguration)
|
||||||
localizedDescription = tunnelConfiguration.name
|
localizedDescription = tunnelConfiguration.name
|
||||||
objc_setAssociatedObject(self, &NETunnelProviderManager.cachedConfigKey, tunnelConfiguration, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
|
objc_setAssociatedObject(self, &NETunnelProviderManager.cachedConfigKey, tunnelConfiguration, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
|
||||||
objc_setAssociatedObject(self, &NETunnelProviderManager.cachedIsConfigAvailableInKeychainKey, NSNumber(value: true), objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEquivalentTo(_ tunnel: TunnelContainer) -> Bool {
|
func isEquivalentTo(_ tunnel: TunnelContainer) -> Bool {
|
||||||
switch (isTunnelConfigurationAvailableInKeychain, tunnel.isTunnelConfigurationAvailableInKeychain) {
|
return localizedDescription == tunnel.name && tunnelConfiguration == tunnel.tunnelConfiguration
|
||||||
case (true, true):
|
|
||||||
return tunnelConfiguration == tunnel.tunnelConfiguration
|
|
||||||
case (false, false):
|
|
||||||
return localizedDescription == tunnel.name
|
|
||||||
default:
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,11 +44,21 @@ class TunnelImporter {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let tunnelConfiguration = try? TunnelConfiguration(fromWgQuickConfig: fileContents, called: fileBaseName)
|
var parseError: Error?
|
||||||
|
var tunnelConfiguration: TunnelConfiguration?
|
||||||
|
do {
|
||||||
|
tunnelConfiguration = try TunnelConfiguration(fromWgQuickConfig: fileContents, called: fileBaseName)
|
||||||
|
} catch let error {
|
||||||
|
parseError = error
|
||||||
|
}
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
if tunnelConfiguration == nil {
|
if parseError != nil {
|
||||||
|
if let parseError = parseError as? WireGuardAppError {
|
||||||
|
lastFileImportErrorText = parseError.alertText
|
||||||
|
} else {
|
||||||
lastFileImportErrorText = (title: tr("alertBadConfigImportTitle"), message: tr(format: "alertBadConfigImportMessage (%@)", fileName))
|
lastFileImportErrorText = (title: tr("alertBadConfigImportTitle"), message: tr(format: "alertBadConfigImportMessage (%@)", fileName))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
configs.append(tunnelConfiguration)
|
configs.append(tunnelConfiguration)
|
||||||
dispatchGroup.leave()
|
dispatchGroup.leave()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,10 +34,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
|
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
|
||||||
guard let tunnelsManager = mainVC?.tunnelsManager else { return true }
|
mainVC?.importFromDisposableFile(url: url)
|
||||||
TunnelImporter.importFromFile(urls: [url], into: tunnelsManager, sourceVC: mainVC, errorPresenterType: ErrorPresenter.self) {
|
|
||||||
_ = FileManager.deleteFile(at: url)
|
|
||||||
}
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,8 @@
|
|||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>$(PRODUCT_NAME)</string>
|
<string>$(PRODUCT_NAME)</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
|
|||||||
@@ -109,6 +109,19 @@ extension MainViewController {
|
|||||||
onTunnelsManagerReady = showTunnelDetailBlock
|
onTunnelsManagerReady = showTunnelDetailBlock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func importFromDisposableFile(url: URL) {
|
||||||
|
let importFromFileBlock: (TunnelsManager) -> Void = { [weak self] tunnelsManager in
|
||||||
|
TunnelImporter.importFromFile(urls: [url], into: tunnelsManager, sourceVC: self, errorPresenterType: ErrorPresenter.self) {
|
||||||
|
_ = FileManager.deleteFile(at: url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if let tunnelsManager = tunnelsManager {
|
||||||
|
importFromFileBlock(tunnelsManager)
|
||||||
|
} else {
|
||||||
|
onTunnelsManagerReady = importFromFileBlock
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension MainViewController: UISplitViewControllerDelegate {
|
extension MainViewController: UISplitViewControllerDelegate {
|
||||||
|
|||||||
@@ -266,6 +266,10 @@ extension SSIDOptionEditTableViewController {
|
|||||||
case .ssidOption:
|
case .ssidOption:
|
||||||
let previousOption = selectedOption
|
let previousOption = selectedOption
|
||||||
selectedOption = ssidOptionFields[indexPath.row]
|
selectedOption = ssidOptionFields[indexPath.row]
|
||||||
|
guard previousOption != selectedOption else {
|
||||||
|
tableView.deselectRow(at: indexPath, animated: true)
|
||||||
|
return
|
||||||
|
}
|
||||||
loadSections()
|
loadSections()
|
||||||
if previousOption == .anySSID {
|
if previousOption == .anySSID {
|
||||||
let indexSet = IndexSet(1 ... 2)
|
let indexSet = IndexSet(1 ... 2)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class SettingsTableViewController: UITableViewController {
|
|||||||
case goBackendVersion
|
case goBackendVersion
|
||||||
case exportZipArchive
|
case exportZipArchive
|
||||||
case viewLog
|
case viewLog
|
||||||
|
case donateLink
|
||||||
|
|
||||||
var localizedUIString: String {
|
var localizedUIString: String {
|
||||||
switch self {
|
switch self {
|
||||||
@@ -18,12 +19,13 @@ class SettingsTableViewController: UITableViewController {
|
|||||||
case .goBackendVersion: return tr("settingsVersionKeyWireGuardGoBackend")
|
case .goBackendVersion: return tr("settingsVersionKeyWireGuardGoBackend")
|
||||||
case .exportZipArchive: return tr("settingsExportZipButtonTitle")
|
case .exportZipArchive: return tr("settingsExportZipButtonTitle")
|
||||||
case .viewLog: return tr("settingsViewLogButtonTitle")
|
case .viewLog: return tr("settingsViewLogButtonTitle")
|
||||||
|
case .donateLink: return tr("donateLink")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let settingsFieldsBySection: [[SettingsFields]] = [
|
let settingsFieldsBySection: [[SettingsFields]] = [
|
||||||
[.iosAppVersion, .goBackendVersion],
|
[.iosAppVersion, .goBackendVersion, .donateLink],
|
||||||
[.exportZipArchive],
|
[.exportZipArchive],
|
||||||
[.viewLog]
|
[.viewLog]
|
||||||
]
|
]
|
||||||
@@ -160,14 +162,23 @@ extension SettingsTableViewController {
|
|||||||
self?.exportConfigurationsAsZipFile(sourceView: cell.button)
|
self?.exportConfigurationsAsZipFile(sourceView: cell.button)
|
||||||
}
|
}
|
||||||
return cell
|
return cell
|
||||||
} else {
|
} else if field == .viewLog {
|
||||||
assert(field == .viewLog)
|
|
||||||
let cell: ButtonCell = tableView.dequeueReusableCell(for: indexPath)
|
let cell: ButtonCell = tableView.dequeueReusableCell(for: indexPath)
|
||||||
cell.buttonText = field.localizedUIString
|
cell.buttonText = field.localizedUIString
|
||||||
cell.onTapped = { [weak self] in
|
cell.onTapped = { [weak self] in
|
||||||
self?.presentLogView()
|
self?.presentLogView()
|
||||||
}
|
}
|
||||||
return cell
|
return cell
|
||||||
|
} else if field == .donateLink {
|
||||||
|
let cell: ButtonCell = tableView.dequeueReusableCell(for: indexPath)
|
||||||
|
cell.buttonText = field.localizedUIString
|
||||||
|
cell.onTapped = {
|
||||||
|
if let url = URL(string: "https://www.wireguard.com/donations/"), UIApplication.shared.canOpenURL(url) {
|
||||||
|
UIApplication.shared.open(url, options: [:])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
fatalError()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,10 +210,13 @@ extension AppDelegate {
|
|||||||
tr(format: "macAppVersion (%@)", appVersion),
|
tr(format: "macAppVersion (%@)", appVersion),
|
||||||
tr(format: "macGoBackendVersion (%@)", WIREGUARD_GO_VERSION)
|
tr(format: "macGoBackendVersion (%@)", WIREGUARD_GO_VERSION)
|
||||||
].joined(separator: "\n")
|
].joined(separator: "\n")
|
||||||
|
let donateString = NSMutableAttributedString(string: tr("donateLink"))
|
||||||
|
donateString.addAttribute(.link, value: "https://www.wireguard.com/donations/", range: NSRange(location: 0, length: donateString.length))
|
||||||
NSApp.activate(ignoringOtherApps: true)
|
NSApp.activate(ignoringOtherApps: true)
|
||||||
NSApp.orderFrontStandardAboutPanel(options: [
|
NSApp.orderFrontStandardAboutPanel(options: [
|
||||||
.applicationVersion: appVersionString,
|
.applicationVersion: appVersionString,
|
||||||
.version: ""
|
.version: "",
|
||||||
|
.credits: donateString
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ extension StatusMenu {
|
|||||||
func insertTunnelMenuItem(for tunnel: TunnelContainer, at tunnelIndex: Int) {
|
func insertTunnelMenuItem(for tunnel: TunnelContainer, at tunnelIndex: Int) {
|
||||||
let menuItem = TunnelMenuItem(tunnel: tunnel, action: #selector(tunnelClicked(sender:)))
|
let menuItem = TunnelMenuItem(tunnel: tunnel, action: #selector(tunnelClicked(sender:)))
|
||||||
menuItem.target = self
|
menuItem.target = self
|
||||||
menuItem.isHidden = !tunnel.isTunnelConfigurationAvailableInKeychain
|
menuItem.isHidden = !tunnel.isTunnelAvailableToUser
|
||||||
insertItem(menuItem, at: firstTunnelMenuItemIndex + tunnelIndex)
|
insertItem(menuItem, at: firstTunnelMenuItemIndex + tunnelIndex)
|
||||||
if numberOfTunnelMenuItems == 0 {
|
if numberOfTunnelMenuItems == 0 {
|
||||||
insertItem(NSMenuItem.separator(), at: firstTunnelMenuItemIndex + tunnelIndex + 1)
|
insertItem(NSMenuItem.separator(), at: firstTunnelMenuItemIndex + tunnelIndex + 1)
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ extension ManageTunnelsRootViewController: TunnelsListTableViewControllerDelegat
|
|||||||
assert(!tunnelIndices.isEmpty)
|
assert(!tunnelIndices.isEmpty)
|
||||||
if tunnelIndices.count == 1 {
|
if tunnelIndices.count == 1 {
|
||||||
let tunnel = tunnelsManager.tunnel(at: tunnelIndices.first!)
|
let tunnel = tunnelsManager.tunnel(at: tunnelIndices.first!)
|
||||||
if tunnel.isTunnelConfigurationAvailableInKeychain {
|
if tunnel.isTunnelAvailableToUser {
|
||||||
let tunnelDetailVC = TunnelDetailTableViewController(tunnelsManager: tunnelsManager, tunnel: tunnel)
|
let tunnelDetailVC = TunnelDetailTableViewController(tunnelsManager: tunnelsManager, tunnel: tunnel)
|
||||||
setTunnelDetailContentVC(tunnelDetailVC)
|
setTunnelDetailContentVC(tunnelDetailVC)
|
||||||
self.tunnelDetailVC = tunnelDetailVC
|
self.tunnelDetailVC = tunnelDetailVC
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class TunnelsListTableViewController: NSViewController {
|
|||||||
|
|
||||||
let tunnelsManager: TunnelsManager
|
let tunnelsManager: TunnelsManager
|
||||||
weak var delegate: TunnelsListTableViewControllerDelegate?
|
weak var delegate: TunnelsListTableViewControllerDelegate?
|
||||||
var isRemovingTunnels = false
|
var isRemovingTunnelsFromWithinTheApp = false
|
||||||
|
|
||||||
let tableView: NSTableView = {
|
let tableView: NSTableView = {
|
||||||
let tableView = NSTableView()
|
let tableView = NSTableView()
|
||||||
@@ -183,8 +183,10 @@ class TunnelsListTableViewController: NSViewController {
|
|||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
self.selectTunnel(at: nextSelection)
|
self.selectTunnel(at: nextSelection)
|
||||||
let selectedTunnels = selectedTunnelIndices.map { self.tunnelsManager.tunnel(at: $0) }
|
let selectedTunnels = selectedTunnelIndices.map { self.tunnelsManager.tunnel(at: $0) }
|
||||||
|
self.isRemovingTunnelsFromWithinTheApp = true
|
||||||
self.tunnelsManager.removeMultiple(tunnels: selectedTunnels) { [weak self] error in
|
self.tunnelsManager.removeMultiple(tunnels: selectedTunnels) { [weak self] error in
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
|
self.isRemovingTunnelsFromWithinTheApp = false
|
||||||
defer { completion() }
|
defer { completion() }
|
||||||
if let error = error {
|
if let error = error {
|
||||||
ErrorPresenter.showErrorAlert(error: error, from: self)
|
ErrorPresenter.showErrorAlert(error: error, from: self)
|
||||||
@@ -281,9 +283,14 @@ extension TunnelsListTableViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func tunnelRemoved(at index: Int) {
|
func tunnelRemoved(at index: Int) {
|
||||||
|
let selectedIndices = tableView.selectedRowIndexes
|
||||||
|
let isSingleSelectedTunnelBeingRemoved = selectedIndices.contains(index) && selectedIndices.count == 1
|
||||||
tableView.removeRows(at: IndexSet(integer: index), withAnimation: .slideLeft)
|
tableView.removeRows(at: IndexSet(integer: index), withAnimation: .slideLeft)
|
||||||
if tunnelsManager.numberOfTunnels() == 0 {
|
if tunnelsManager.numberOfTunnels() == 0 {
|
||||||
delegate?.tunnelsListEmpty()
|
delegate?.tunnelsListEmpty()
|
||||||
|
} else if !isRemovingTunnelsFromWithinTheApp && isSingleSelectedTunnelBeingRemoved {
|
||||||
|
let newSelection = min(index, tunnelsManager.numberOfTunnels() - 1)
|
||||||
|
tableView.selectRowIndexes(IndexSet(integer: newSelection), byExtendingSelection: false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
|||||||
private var handle: Int32?
|
private var handle: Int32?
|
||||||
private var networkMonitor: NWPathMonitor?
|
private var networkMonitor: NWPathMonitor?
|
||||||
private var ifname: String?
|
private var ifname: String?
|
||||||
private var lastPath: Network.NWPath?
|
|
||||||
private var packetTunnelSettingsGenerator: PacketTunnelSettingsGenerator?
|
private var packetTunnelSettingsGenerator: PacketTunnelSettingsGenerator?
|
||||||
|
|
||||||
deinit {
|
deinit {
|
||||||
@@ -150,12 +149,9 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
|||||||
_ = packetTunnelSettingsGenerator.endpointUapiConfiguration().withGoString { return wgSetConfig(handle, $0) }
|
_ = packetTunnelSettingsGenerator.endpointUapiConfiguration().withGoString { return wgSetConfig(handle, $0) }
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if path != lastPath {
|
|
||||||
lastPath = path
|
|
||||||
wgBumpSockets(handle)
|
wgBumpSockets(handle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
extension String {
|
extension String {
|
||||||
func withGoString<R>(_ call: (gostring_t) -> R) -> R {
|
func withGoString<R>(_ call: (gostring_t) -> R) -> R {
|
||||||
|
|||||||
@@ -14,60 +14,37 @@ LIPO ?= lipo
|
|||||||
DESTDIR ?= $(CONFIGURATION_BUILD_DIR)
|
DESTDIR ?= $(CONFIGURATION_BUILD_DIR)
|
||||||
BUILDDIR ?= $(CONFIGURATION_TEMP_DIR)/wireguard-go-bridge
|
BUILDDIR ?= $(CONFIGURATION_TEMP_DIR)/wireguard-go-bridge
|
||||||
|
|
||||||
UPSTREAM_FILES := $(filter-out %/main.go %/queueconstants.go,$(wildcard ../wireguard-go/*/*.go) $(wildcard ../wireguard-go/*.go)) ../wireguard-go/go.mod ../wireguard-go/go.sum
|
|
||||||
DOWNSTREAM_FILES := $(wildcard src/*.go) $(wildcard src/*/*.go)
|
|
||||||
CFLAGS_PREFIX := $(if $(DEPLOYMENT_TARGET_CLANG_FLAG_NAME),-$(DEPLOYMENT_TARGET_CLANG_FLAG_NAME)=$($(DEPLOYMENT_TARGET_CLANG_ENV_NAME)),) -Wno-unused-command-line-argument -isysroot $(SDKROOT) -arch
|
CFLAGS_PREFIX := $(if $(DEPLOYMENT_TARGET_CLANG_FLAG_NAME),-$(DEPLOYMENT_TARGET_CLANG_FLAG_NAME)=$($(DEPLOYMENT_TARGET_CLANG_ENV_NAME)),) -Wno-unused-command-line-argument -isysroot $(SDKROOT) -arch
|
||||||
GOARCH_arm64 := arm64
|
GOARCH_arm64 := arm64
|
||||||
GOARCH_armv7 := arm
|
GOARCH_armv7 := arm
|
||||||
GOARCH_x86_64 := amd64
|
GOARCH_x86_64 := amd64
|
||||||
export GOOS := darwin
|
|
||||||
export CGO_ENABLED := 1
|
|
||||||
|
|
||||||
build: $(DESTDIR)/libwg-go.a
|
build: $(DESTDIR)/libwg-go.a
|
||||||
version-header: $(DESTDIR)/wireguard-go-version.h
|
version-header: $(DESTDIR)/wireguard-go-version.h
|
||||||
|
|
||||||
GOBUILDVERSION_NEEDED := go version go1.12.5 darwin/amd64
|
REAL_GOROOT := $(shell go env GOROOT 2>/dev/null)
|
||||||
GOBUILDVERSION_CURRENT := $(shell go version 2>/dev/null)
|
|
||||||
export REAL_GOROOT := $(shell go env GOROOT 2>/dev/null)
|
|
||||||
export GOROOT := $(BUILDDIR)/goroot
|
export GOROOT := $(BUILDDIR)/goroot
|
||||||
export GOPATH := $(BUILDDIR)/gopath
|
|
||||||
export PATH := $(GOPATH)/bin:$(PATH)
|
|
||||||
GOBUILDVERSION_FAKE := $(shell $(GOROOT)/bin/go version 2>/dev/null)
|
|
||||||
ifneq ($(GOBUILDVERSION_NEEDED),$(GOBUILDVERSION_CURRENT))
|
|
||||||
$(error This requires $(GOBUILDVERSION_NEEDED))
|
|
||||||
endif
|
|
||||||
ifneq ($(GOBUILDVERSION_NEEDED),$(GOBUILDVERSION_FAKE))
|
|
||||||
$(shell rm -f $(GOROOT)/.prepared)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(GOROOT)/.prepared:
|
$(GOROOT)/.prepared:
|
||||||
[ -n "$(REAL_GOROOT)" ]
|
[ -n "$(REAL_GOROOT)" ]
|
||||||
mkdir -p "$(GOROOT)"
|
mkdir -p "$(GOROOT)"
|
||||||
rsync -a --delete --exclude=pkg/obj/go-build "$(REAL_GOROOT)/" "$(GOROOT)/"
|
rsync -a --delete --exclude=pkg/obj/go-build "$(REAL_GOROOT)/" "$(GOROOT)/"
|
||||||
cat goruntime-*.diff | patch -p1 -f -N -r- -d "$(GOROOT)"
|
patch -p1 -f -N -r- -d "$(GOROOT)" < goruntime-boottime-over-monotonic.diff
|
||||||
rm -rf "$(GOPATH)/pkg/mod"
|
|
||||||
go get -d -tags ios; chmod -fR +w "$(GOPATH)/pkg/mod"
|
|
||||||
for sys in "$(GOPATH)/pkg/mod/golang.org/x/sys@"*; do cat sys-unix-*.diff | patch -p1 -f -N -r- -d "$$sys"; done
|
|
||||||
touch "$@"
|
touch "$@"
|
||||||
|
|
||||||
$(shell test "$$(cat "$(BUILDDIR)/.gobuildversion" 2>/dev/null)" = "$(GOBUILDVERSION_CURRENT)" || rm -f "$(DESTDIR)/libwg-go.a")
|
|
||||||
|
|
||||||
define libwg-go-a
|
define libwg-go-a
|
||||||
$(BUILDDIR)/libwg-go-$(1).a: $(GOROOT)/.prepared
|
$(BUILDDIR)/libwg-go-$(1).a: export CGO_ENABLED := 1
|
||||||
CGO_CFLAGS="$(CFLAGS_PREFIX) $(ARCH)" \
|
$(BUILDDIR)/libwg-go-$(1).a: export CGO_CFLAGS := $(CFLAGS_PREFIX) $(ARCH)
|
||||||
CGO_LDFLAGS="$(CFLAGS_PREFIX) $(ARCH)" \
|
$(BUILDDIR)/libwg-go-$(1).a: export CGO_LDFLAGS := $(CFLAGS_PREFIX) $(ARCH)
|
||||||
GOARCH="$(GOARCH_$(1))" \
|
$(BUILDDIR)/libwg-go-$(1).a: export GOOS := darwin
|
||||||
go build -tags ios -ldflags=-w -v -o "$(BUILDDIR)/libwg-go-$(1).a" -buildmode c-archive && go version > "$(BUILDDIR)/.gobuildversion"; \
|
$(BUILDDIR)/libwg-go-$(1).a: export GOARCH := $(GOARCH_$(1))
|
||||||
chmod -fR +w "$(GOPATH)/pkg/mod"; \
|
$(BUILDDIR)/libwg-go-$(1).a: $(GOROOT)/.prepared go.mod
|
||||||
ret=$$$$?; \
|
go build -tags ios -ldflags=-w -trimpath -v -o "$(BUILDDIR)/libwg-go-$(1).a" -buildmode c-archive
|
||||||
rm -f "$(BUILDDIR)/libwg-go-$(1).h"; \
|
rm -f "$(BUILDDIR)/libwg-go-$(1).h"
|
||||||
exit $$$$ret
|
|
||||||
endef
|
endef
|
||||||
$(foreach ARCH,$(ARCHS),$(eval $(call libwg-go-a,$(ARCH))))
|
$(foreach ARCH,$(ARCHS),$(eval $(call libwg-go-a,$(ARCH))))
|
||||||
|
|
||||||
$(DESTDIR)/wireguard-go-version.h: go.mod $(GOROOT)/.prepared
|
$(DESTDIR)/wireguard-go-version.h: $(GOROOT)/.prepared go.mod
|
||||||
wggo="$(GOPATH)/pkg/mod/$$(sed -n 's/.*\(golang\.zx2c4\.com\/wireguard\) \(.*\)$$/\1@\2/p' go.mod)"; \
|
go list -m golang.zx2c4.com/wireguard | sed -n 's/.*v\([0-9.]*\).*/#define WIREGUARD_GO_VERSION "\1"/p' > "$@"
|
||||||
sed -n 's/.*WireGuardGoVersion = "\(.*\)"/#define WIREGUARD_GO_VERSION "\1"/p' "$$wggo/device/version.go" > "$@"
|
|
||||||
|
|
||||||
$(DESTDIR)/libwg-go.a: $(foreach ARCH,$(ARCHS),$(BUILDDIR)/libwg-go-$(ARCH).a)
|
$(DESTDIR)/libwg-go.a: $(foreach ARCH,$(ARCHS),$(BUILDDIR)/libwg-go-$(ARCH).a)
|
||||||
@mkdir -vp "$(DESTDIR)"
|
@mkdir -vp "$(DESTDIR)"
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
module golang.zx2c4.com/wireguard/ios
|
module golang.zx2c4.com/wireguard/ios
|
||||||
|
|
||||||
go 1.12
|
go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5
|
golang.org/x/net v0.0.0-20191007182048-72f939374954 // indirect
|
||||||
golang.zx2c4.com/wireguard v0.0.20190518-0.20190530131616-d9f995209c3c
|
golang.org/x/sys v0.0.0-20191008105621-543471e840be
|
||||||
|
golang.zx2c4.com/wireguard v0.0.20190909-0.20191008144818-222f0f8000e8
|
||||||
)
|
)
|
||||||
|
|||||||
+15
-18
@@ -1,23 +1,20 @@
|
|||||||
github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576 h1:aUX/1G2gFSs4AsJJg2cL3HuoRhCSCz733FE5GUSuaT4=
|
golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc h1:c0o/qxkaO2LF5t6fQrT4b5hzyggAkLLlCUjqfRxd8Q4=
|
||||||
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f h1:R423Cnkcp5JABoeemiGEPlt9tHXFfw5kvc0yqlxRPWo=
|
|
||||||
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53 h1:kcXqo9vE6fsZY5X5Rd7R1l7fTgnWaDCVmln65REefiE=
|
|
||||||
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190522155817-f3200d17e092 h1:4QSRKanuywn15aTZvI/mIDEgPQpswuFndXpOj3rKEco=
|
golang.org/x/net v0.0.0-20191003171128-d98b1b443823 h1:Ypyv6BNJh07T1pUSrehkLemqPKXhus2MkfktJ91kRh4=
|
||||||
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
golang.org/x/net v0.0.0-20191003171128-d98b1b443823/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20191007182048-72f939374954 h1:JGZucVF/L/TotR719NbujzadOZ2AgnYlqphQGHDCKaU=
|
||||||
|
golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998=
|
|
||||||
golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5 h1:f005F/Jl5JLP036x7QIvUVhNTqxvSYwFIiyOh2q12iU=
|
golang.org/x/sys v0.0.0-20191003212358-c178f38b412c h1:6Zx7DRlKXf79yfxuQ/7GqV3w2y7aDsk6bGg0MzF5RVU=
|
||||||
golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191003212358-c178f38b412c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU=
|
||||||
|
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.zx2c4.com/wireguard v0.0.0-20190409083948-18fa27047265 h1:ujM5BaP4MD/2MJZ1n7pmw6IIsyyS7SyPl0fDefnx/2o=
|
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||||
golang.zx2c4.com/wireguard v0.0.0-20190409083948-18fa27047265/go.mod h1:u0Cl3X+pyWdXaax3S583DQrnGDuTASO0QdlKFrs8r/8=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.zx2c4.com/wireguard v0.0.20190518-0.20190530131616-d9f995209c3c h1:nUKiRKxUjK8Zghs+JBZZYXo0g51BlXVqkr6mDfm22ow=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.zx2c4.com/wireguard v0.0.20190518-0.20190530131616-d9f995209c3c/go.mod h1:8X7vp4RrsvM83bde6vQ94DsL4ZpjUViVUym8aa8zGhs=
|
golang.zx2c4.com/wireguard v0.0.20190909-0.20191008144818-222f0f8000e8 h1:BqfQHKZLrdq0j5Z/R9coISbr1nYcSE+3BdyF5LidO+g=
|
||||||
|
golang.zx2c4.com/wireguard v0.0.20190909-0.20191008144818-222f0f8000e8/go.mod h1:P2HsVp8SKwZEufsnezXZA4GRX/T49/HlU7DGuelXsU4=
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From 74523c5a12d37fa792e77a252bcc569484c3d41a Mon Sep 17 00:00:00 2001
|
From 04f5695b83cd221e99e9fa6171b57e45177d5ad3 Mon Sep 17 00:00:00 2001
|
||||||
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
|
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
|
||||||
Date: Wed, 27 Feb 2019 05:33:01 +0100
|
Date: Wed, 27 Feb 2019 05:33:01 +0100
|
||||||
Subject: [PATCH] runtime: use libc_mach_continuous_time in nanotime on Darwin
|
Subject: [PATCH] runtime: use libc_mach_continuous_time in nanotime on Darwin
|
||||||
@@ -18,10 +18,10 @@ Fixes #24595
|
|||||||
5 files changed, 5 insertions(+), 5 deletions(-)
|
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/runtime/sys_darwin.go b/src/runtime/sys_darwin.go
|
diff --git a/src/runtime/sys_darwin.go b/src/runtime/sys_darwin.go
|
||||||
index f34ac88352..416fcb673f 100644
|
index 376f76dbc5..a0677a83f6 100644
|
||||||
--- a/src/runtime/sys_darwin.go
|
--- a/src/runtime/sys_darwin.go
|
||||||
+++ b/src/runtime/sys_darwin.go
|
+++ b/src/runtime/sys_darwin.go
|
||||||
@@ -403,7 +403,7 @@ func closeonexec(fd int32) {
|
@@ -431,7 +431,7 @@ func setNonblock(fd int32) {
|
||||||
//go:cgo_import_dynamic libc_usleep usleep "/usr/lib/libSystem.B.dylib"
|
//go:cgo_import_dynamic libc_usleep usleep "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
//go:cgo_import_dynamic libc_mach_timebase_info mach_timebase_info "/usr/lib/libSystem.B.dylib"
|
//go:cgo_import_dynamic libc_mach_timebase_info mach_timebase_info "/usr/lib/libSystem.B.dylib"
|
||||||
@@ -31,10 +31,10 @@ index f34ac88352..416fcb673f 100644
|
|||||||
//go:cgo_import_dynamic libc_sigaction sigaction "/usr/lib/libSystem.B.dylib"
|
//go:cgo_import_dynamic libc_sigaction sigaction "/usr/lib/libSystem.B.dylib"
|
||||||
//go:cgo_import_dynamic libc_pthread_sigmask pthread_sigmask "/usr/lib/libSystem.B.dylib"
|
//go:cgo_import_dynamic libc_pthread_sigmask pthread_sigmask "/usr/lib/libSystem.B.dylib"
|
||||||
diff --git a/src/runtime/sys_darwin_386.s b/src/runtime/sys_darwin_386.s
|
diff --git a/src/runtime/sys_darwin_386.s b/src/runtime/sys_darwin_386.s
|
||||||
index 1bc1a63c28..34a3561350 100644
|
index e653c54f61..5a43fcbdc1 100644
|
||||||
--- a/src/runtime/sys_darwin_386.s
|
--- a/src/runtime/sys_darwin_386.s
|
||||||
+++ b/src/runtime/sys_darwin_386.s
|
+++ b/src/runtime/sys_darwin_386.s
|
||||||
@@ -184,7 +184,7 @@ TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$0
|
@@ -199,7 +199,7 @@ TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$0
|
||||||
PUSHL BP
|
PUSHL BP
|
||||||
MOVL SP, BP
|
MOVL SP, BP
|
||||||
SUBL $8+(machTimebaseInfo__size+15)/16*16, SP
|
SUBL $8+(machTimebaseInfo__size+15)/16*16, SP
|
||||||
@@ -44,10 +44,10 @@ index 1bc1a63c28..34a3561350 100644
|
|||||||
MOVL AX, 0(CX)
|
MOVL AX, 0(CX)
|
||||||
MOVL DX, 4(CX)
|
MOVL DX, 4(CX)
|
||||||
diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s
|
diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s
|
||||||
index f99cb00ab8..8b99316983 100644
|
index 87c8db8c82..f962f24339 100644
|
||||||
--- a/src/runtime/sys_darwin_amd64.s
|
--- a/src/runtime/sys_darwin_amd64.s
|
||||||
+++ b/src/runtime/sys_darwin_amd64.s
|
+++ b/src/runtime/sys_darwin_amd64.s
|
||||||
@@ -86,7 +86,7 @@ TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$0
|
@@ -97,7 +97,7 @@ TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$0
|
||||||
PUSHQ BP
|
PUSHQ BP
|
||||||
MOVQ SP, BP
|
MOVQ SP, BP
|
||||||
MOVQ DI, BX
|
MOVQ DI, BX
|
||||||
@@ -57,10 +57,10 @@ index f99cb00ab8..8b99316983 100644
|
|||||||
MOVL timebase<>+machTimebaseInfo_numer(SB), SI
|
MOVL timebase<>+machTimebaseInfo_numer(SB), SI
|
||||||
MOVL timebase<>+machTimebaseInfo_denom(SB), DI // atomic read
|
MOVL timebase<>+machTimebaseInfo_denom(SB), DI // atomic read
|
||||||
diff --git a/src/runtime/sys_darwin_arm.s b/src/runtime/sys_darwin_arm.s
|
diff --git a/src/runtime/sys_darwin_arm.s b/src/runtime/sys_darwin_arm.s
|
||||||
index 54c7afbf34..a4f06fdb85 100644
|
index 996f8028a3..5bd34b51be 100644
|
||||||
--- a/src/runtime/sys_darwin_arm.s
|
--- a/src/runtime/sys_darwin_arm.s
|
||||||
+++ b/src/runtime/sys_darwin_arm.s
|
+++ b/src/runtime/sys_darwin_arm.s
|
||||||
@@ -118,7 +118,7 @@ GLOBL timebase<>(SB),NOPTR,$(machTimebaseInfo__size)
|
@@ -126,7 +126,7 @@ GLOBL timebase<>(SB),NOPTR,$(machTimebaseInfo__size)
|
||||||
|
|
||||||
TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$0
|
TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$0
|
||||||
MOVW R0, R8
|
MOVW R0, R8
|
||||||
@@ -70,10 +70,10 @@ index 54c7afbf34..a4f06fdb85 100644
|
|||||||
MOVW R1, 4(R8)
|
MOVW R1, 4(R8)
|
||||||
MOVW timebase<>+machTimebaseInfo_numer(SB), R6
|
MOVW timebase<>+machTimebaseInfo_numer(SB), R6
|
||||||
diff --git a/src/runtime/sys_darwin_arm64.s b/src/runtime/sys_darwin_arm64.s
|
diff --git a/src/runtime/sys_darwin_arm64.s b/src/runtime/sys_darwin_arm64.s
|
||||||
index 29951d8ad7..cdaf0a630e 100644
|
index ac3ca74f63..5e91540f94 100644
|
||||||
--- a/src/runtime/sys_darwin_arm64.s
|
--- a/src/runtime/sys_darwin_arm64.s
|
||||||
+++ b/src/runtime/sys_darwin_arm64.s
|
+++ b/src/runtime/sys_darwin_arm64.s
|
||||||
@@ -113,7 +113,7 @@ GLOBL timebase<>(SB),NOPTR,$(machTimebaseInfo__size)
|
@@ -121,7 +121,7 @@ GLOBL timebase<>(SB),NOPTR,$(machTimebaseInfo__size)
|
||||||
|
|
||||||
TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$40
|
TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$40
|
||||||
MOVD R0, R19
|
MOVD R0, R19
|
||||||
@@ -83,5 +83,5 @@ index 29951d8ad7..cdaf0a630e 100644
|
|||||||
MOVW timebase<>+machTimebaseInfo_numer(SB), R20
|
MOVW timebase<>+machTimebaseInfo_numer(SB), R20
|
||||||
MOVD $timebase<>+machTimebaseInfo_denom(SB), R21
|
MOVD $timebase<>+machTimebaseInfo_denom(SB), R21
|
||||||
--
|
--
|
||||||
2.20.1
|
2.23.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,279 +0,0 @@
|
|||||||
From bc77ad792117829909eeeca3aa492d6f292d004d Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
|
|
||||||
Date: Tue, 19 Mar 2019 13:55:44 -0600
|
|
||||||
Subject: [PATCH] syscall: do not link against ___getdirentries64
|
|
||||||
|
|
||||||
---
|
|
||||||
.../x/sys/unix/syscall_darwin_386.go | 5 ++++-
|
|
||||||
.../x/sys/unix/syscall_darwin_amd64.go | 5 ++++-
|
|
||||||
.../x/sys/unix/zsyscall_darwin_386.go | 22 -------------------
|
|
||||||
.../x/sys/unix/zsyscall_darwin_386.s | 2 --
|
|
||||||
.../x/sys/unix/zsyscall_darwin_amd64.go | 22 -------------------
|
|
||||||
.../x/sys/unix/zsyscall_darwin_amd64.s | 2 --
|
|
||||||
src/syscall/syscall_darwin_386.go | 5 ++++-
|
|
||||||
src/syscall/syscall_darwin_amd64.go | 5 ++++-
|
|
||||||
src/syscall/zsyscall_darwin_386.go | 20 -----------------
|
|
||||||
src/syscall/zsyscall_darwin_386.s | 2 --
|
|
||||||
src/syscall/zsyscall_darwin_amd64.go | 20 -----------------
|
|
||||||
src/syscall/zsyscall_darwin_amd64.s | 2 --
|
|
||||||
12 files changed, 16 insertions(+), 96 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
|
|
||||||
index 489726fa9b..900dd7c91f 100644
|
|
||||||
--- a/src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
|
|
||||||
+++ b/src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
|
|
||||||
@@ -56,8 +56,11 @@ const SYS___SYSCTL = SYS_SYSCTL
|
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
|
||||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
|
||||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
|
|
||||||
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
|
|
||||||
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
|
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
|
||||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
|
||||||
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
|
||||||
+
|
|
||||||
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
+ return 0, ENOSYS
|
|
||||||
+}
|
|
||||||
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
|
|
||||||
index 914b89bde5..95e245fff7 100644
|
|
||||||
--- a/src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
|
|
||||||
+++ b/src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
|
|
||||||
@@ -56,8 +56,11 @@ const SYS___SYSCTL = SYS_SYSCTL
|
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
|
||||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
|
||||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
|
|
||||||
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
|
|
||||||
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
|
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
|
||||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
|
||||||
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
|
||||||
+
|
|
||||||
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
+ return 0, ENOSYS
|
|
||||||
+}
|
|
||||||
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
|
|
||||||
index 23346dc68f..db4f1eaf1c 100644
|
|
||||||
--- a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
|
|
||||||
+++ b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
|
|
||||||
@@ -2408,28 +2408,6 @@ func libc_fstatfs64_trampoline()
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
- var _p0 unsafe.Pointer
|
|
||||||
- if len(buf) > 0 {
|
|
||||||
- _p0 = unsafe.Pointer(&buf[0])
|
|
||||||
- } else {
|
|
||||||
- _p0 = unsafe.Pointer(&_zero)
|
|
||||||
- }
|
|
||||||
- r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
|
||||||
- n = int(r0)
|
|
||||||
- if e1 != 0 {
|
|
||||||
- err = errnoErr(e1)
|
|
||||||
- }
|
|
||||||
- return
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-func libc___getdirentries64_trampoline()
|
|
||||||
-
|
|
||||||
-//go:linkname libc___getdirentries64 libc___getdirentries64
|
|
||||||
-//go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
|
|
||||||
-
|
|
||||||
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
-
|
|
||||||
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
|
|
||||||
r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
|
|
||||||
n = int(r0)
|
|
||||||
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
|
|
||||||
index 37b85b4f61..6165f70e33 100644
|
|
||||||
--- a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
|
|
||||||
+++ b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
|
|
||||||
@@ -272,8 +272,6 @@ TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatat64(SB)
|
|
||||||
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatfs64(SB)
|
|
||||||
-TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
- JMP libc___getdirentries64(SB)
|
|
||||||
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_getfsstat64(SB)
|
|
||||||
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
|
|
||||||
index b50178d679..dea5dee75e 100644
|
|
||||||
--- a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
|
|
||||||
+++ b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
|
|
||||||
@@ -2408,28 +2408,6 @@ func libc_fstatfs64_trampoline()
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
- var _p0 unsafe.Pointer
|
|
||||||
- if len(buf) > 0 {
|
|
||||||
- _p0 = unsafe.Pointer(&buf[0])
|
|
||||||
- } else {
|
|
||||||
- _p0 = unsafe.Pointer(&_zero)
|
|
||||||
- }
|
|
||||||
- r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
|
||||||
- n = int(r0)
|
|
||||||
- if e1 != 0 {
|
|
||||||
- err = errnoErr(e1)
|
|
||||||
- }
|
|
||||||
- return
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-func libc___getdirentries64_trampoline()
|
|
||||||
-
|
|
||||||
-//go:linkname libc___getdirentries64 libc___getdirentries64
|
|
||||||
-//go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
|
|
||||||
-
|
|
||||||
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
-
|
|
||||||
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
|
|
||||||
r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
|
|
||||||
n = int(r0)
|
|
||||||
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
|
|
||||||
index da9b900a8c..f1e2d7e9a4 100644
|
|
||||||
--- a/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
|
|
||||||
+++ b/src/cmd/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
|
|
||||||
@@ -272,8 +272,6 @@ TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatat64(SB)
|
|
||||||
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatfs64(SB)
|
|
||||||
-TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
- JMP libc___getdirentries64(SB)
|
|
||||||
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_getfsstat64(SB)
|
|
||||||
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
diff --git a/src/syscall/syscall_darwin_386.go b/src/syscall/syscall_darwin_386.go
|
|
||||||
index 045ebc726b..826d76f569 100644
|
|
||||||
--- a/src/syscall/syscall_darwin_386.go
|
|
||||||
+++ b/src/syscall/syscall_darwin_386.go
|
|
||||||
@@ -16,7 +16,6 @@ func setTimeval(sec, usec int64) Timeval {
|
|
||||||
|
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_fstat64
|
|
||||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_fstatfs64
|
|
||||||
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS___getdirentries64
|
|
||||||
//sysnb Gettimeofday(tp *Timeval) (err error)
|
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_lstat64
|
|
||||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_stat64
|
|
||||||
@@ -63,3 +62,7 @@ func libc_sendfile_trampoline()
|
|
||||||
func syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
|
|
||||||
|
|
||||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
|
|
||||||
+
|
|
||||||
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
+ return 0, ENOSYS
|
|
||||||
+}
|
|
||||||
diff --git a/src/syscall/syscall_darwin_amd64.go b/src/syscall/syscall_darwin_amd64.go
|
|
||||||
index 7b6493bf9f..3868790049 100644
|
|
||||||
--- a/src/syscall/syscall_darwin_amd64.go
|
|
||||||
+++ b/src/syscall/syscall_darwin_amd64.go
|
|
||||||
@@ -16,7 +16,6 @@ func setTimeval(sec, usec int64) Timeval {
|
|
||||||
|
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_fstat64
|
|
||||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_fstatfs64
|
|
||||||
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS___getdirentries64
|
|
||||||
//sysnb Gettimeofday(tp *Timeval) (err error)
|
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_lstat64
|
|
||||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_stat64
|
|
||||||
@@ -63,3 +62,7 @@ func libc_sendfile_trampoline()
|
|
||||||
func syscallX(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
|
|
||||||
|
|
||||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
|
|
||||||
+
|
|
||||||
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
+ return 0, ENOSYS
|
|
||||||
+}
|
|
||||||
diff --git a/src/syscall/zsyscall_darwin_386.go b/src/syscall/zsyscall_darwin_386.go
|
|
||||||
index 758ff7b129..a666a1f65e 100644
|
|
||||||
--- a/src/syscall/zsyscall_darwin_386.go
|
|
||||||
+++ b/src/syscall/zsyscall_darwin_386.go
|
|
||||||
@@ -1845,27 +1845,7 @@ func libc_fstatfs64_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_fstatfs64 libc_fstatfs64
|
|
||||||
//go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
|
|
||||||
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
-
|
|
||||||
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
- var _p0 unsafe.Pointer
|
|
||||||
- if len(buf) > 0 {
|
|
||||||
- _p0 = unsafe.Pointer(&buf[0])
|
|
||||||
- } else {
|
|
||||||
- _p0 = unsafe.Pointer(&_zero)
|
|
||||||
- }
|
|
||||||
- r0, _, e1 := syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
|
||||||
- n = int(r0)
|
|
||||||
- if e1 != 0 {
|
|
||||||
- err = errnoErr(e1)
|
|
||||||
- }
|
|
||||||
- return
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-func libc___getdirentries64_trampoline()
|
|
||||||
|
|
||||||
-//go:linkname libc___getdirentries64 libc___getdirentries64
|
|
||||||
-//go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Gettimeofday(tp *Timeval) (err error) {
|
|
||||||
diff --git a/src/syscall/zsyscall_darwin_386.s b/src/syscall/zsyscall_darwin_386.s
|
|
||||||
index a688192501..a5af9b64b9 100644
|
|
||||||
--- a/src/syscall/zsyscall_darwin_386.s
|
|
||||||
+++ b/src/syscall/zsyscall_darwin_386.s
|
|
||||||
@@ -235,8 +235,6 @@ TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstat64(SB)
|
|
||||||
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatfs64(SB)
|
|
||||||
-TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
- JMP libc___getdirentries64(SB)
|
|
||||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_gettimeofday(SB)
|
|
||||||
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
diff --git a/src/syscall/zsyscall_darwin_amd64.go b/src/syscall/zsyscall_darwin_amd64.go
|
|
||||||
index afc3d72d8d..bb87aef1f9 100644
|
|
||||||
--- a/src/syscall/zsyscall_darwin_amd64.go
|
|
||||||
+++ b/src/syscall/zsyscall_darwin_amd64.go
|
|
||||||
@@ -1845,27 +1845,7 @@ func libc_fstatfs64_trampoline()
|
|
||||||
|
|
||||||
//go:linkname libc_fstatfs64 libc_fstatfs64
|
|
||||||
//go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
|
|
||||||
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
-
|
|
||||||
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
- var _p0 unsafe.Pointer
|
|
||||||
- if len(buf) > 0 {
|
|
||||||
- _p0 = unsafe.Pointer(&buf[0])
|
|
||||||
- } else {
|
|
||||||
- _p0 = unsafe.Pointer(&_zero)
|
|
||||||
- }
|
|
||||||
- r0, _, e1 := syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
|
||||||
- n = int(r0)
|
|
||||||
- if e1 != 0 {
|
|
||||||
- err = errnoErr(e1)
|
|
||||||
- }
|
|
||||||
- return
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-func libc___getdirentries64_trampoline()
|
|
||||||
|
|
||||||
-//go:linkname libc___getdirentries64 libc___getdirentries64
|
|
||||||
-//go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
func Gettimeofday(tp *Timeval) (err error) {
|
|
||||||
diff --git a/src/syscall/zsyscall_darwin_amd64.s b/src/syscall/zsyscall_darwin_amd64.s
|
|
||||||
index 21ab38e3ee..409320dea5 100644
|
|
||||||
--- a/src/syscall/zsyscall_darwin_amd64.s
|
|
||||||
+++ b/src/syscall/zsyscall_darwin_amd64.s
|
|
||||||
@@ -235,8 +235,6 @@ TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstat64(SB)
|
|
||||||
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatfs64(SB)
|
|
||||||
-TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
- JMP libc___getdirentries64(SB)
|
|
||||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_gettimeofday(SB)
|
|
||||||
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
||||||
@@ -1,143 +0,0 @@
|
|||||||
From 3efe4df9b66d4af86363e37768ea469abb8f7bdc Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
|
|
||||||
Date: Tue, 19 Mar 2019 14:01:21 -0600
|
|
||||||
Subject: [PATCH] unix: do not link against ___getdirentries64
|
|
||||||
|
|
||||||
---
|
|
||||||
unix/syscall_darwin_386.go | 5 ++++-
|
|
||||||
unix/syscall_darwin_amd64.go | 5 ++++-
|
|
||||||
unix/zsyscall_darwin_386.go | 22 ----------------------
|
|
||||||
unix/zsyscall_darwin_386.s | 2 --
|
|
||||||
unix/zsyscall_darwin_amd64.go | 22 ----------------------
|
|
||||||
unix/zsyscall_darwin_amd64.s | 2 --
|
|
||||||
6 files changed, 8 insertions(+), 50 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/unix/syscall_darwin_386.go b/unix/syscall_darwin_386.go
|
|
||||||
index 489726f..900dd7c 100644
|
|
||||||
--- a/unix/syscall_darwin_386.go
|
|
||||||
+++ b/unix/syscall_darwin_386.go
|
|
||||||
@@ -56,8 +56,11 @@ const SYS___SYSCTL = SYS_SYSCTL
|
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
|
||||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
|
||||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
|
|
||||||
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
|
|
||||||
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
|
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
|
||||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
|
||||||
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
|
||||||
+
|
|
||||||
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
+ return 0, ENOSYS
|
|
||||||
+}
|
|
||||||
diff --git a/unix/syscall_darwin_amd64.go b/unix/syscall_darwin_amd64.go
|
|
||||||
index 914b89b..95e245f 100644
|
|
||||||
--- a/unix/syscall_darwin_amd64.go
|
|
||||||
+++ b/unix/syscall_darwin_amd64.go
|
|
||||||
@@ -56,8 +56,11 @@ const SYS___SYSCTL = SYS_SYSCTL
|
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
|
||||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
|
||||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
|
|
||||||
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
|
|
||||||
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
|
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
|
||||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
|
||||||
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
|
||||||
+
|
|
||||||
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
+ return 0, ENOSYS
|
|
||||||
+}
|
|
||||||
diff --git a/unix/zsyscall_darwin_386.go b/unix/zsyscall_darwin_386.go
|
|
||||||
index 23346dc..db4f1ea 100644
|
|
||||||
--- a/unix/zsyscall_darwin_386.go
|
|
||||||
+++ b/unix/zsyscall_darwin_386.go
|
|
||||||
@@ -2408,28 +2408,6 @@ func libc_fstatfs64_trampoline()
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
- var _p0 unsafe.Pointer
|
|
||||||
- if len(buf) > 0 {
|
|
||||||
- _p0 = unsafe.Pointer(&buf[0])
|
|
||||||
- } else {
|
|
||||||
- _p0 = unsafe.Pointer(&_zero)
|
|
||||||
- }
|
|
||||||
- r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
|
||||||
- n = int(r0)
|
|
||||||
- if e1 != 0 {
|
|
||||||
- err = errnoErr(e1)
|
|
||||||
- }
|
|
||||||
- return
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-func libc___getdirentries64_trampoline()
|
|
||||||
-
|
|
||||||
-//go:linkname libc___getdirentries64 libc___getdirentries64
|
|
||||||
-//go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
|
|
||||||
-
|
|
||||||
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
-
|
|
||||||
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
|
|
||||||
r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
|
|
||||||
n = int(r0)
|
|
||||||
diff --git a/unix/zsyscall_darwin_386.s b/unix/zsyscall_darwin_386.s
|
|
||||||
index 37b85b4..6165f70 100644
|
|
||||||
--- a/unix/zsyscall_darwin_386.s
|
|
||||||
+++ b/unix/zsyscall_darwin_386.s
|
|
||||||
@@ -272,8 +272,6 @@ TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatat64(SB)
|
|
||||||
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatfs64(SB)
|
|
||||||
-TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
- JMP libc___getdirentries64(SB)
|
|
||||||
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_getfsstat64(SB)
|
|
||||||
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
diff --git a/unix/zsyscall_darwin_amd64.go b/unix/zsyscall_darwin_amd64.go
|
|
||||||
index c142e33..126f993 100644
|
|
||||||
--- a/unix/zsyscall_darwin_amd64.go
|
|
||||||
+++ b/unix/zsyscall_darwin_amd64.go
|
|
||||||
@@ -2423,28 +2423,6 @@ func libc_fstatfs64_trampoline()
|
|
||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
|
|
||||||
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|
||||||
- var _p0 unsafe.Pointer
|
|
||||||
- if len(buf) > 0 {
|
|
||||||
- _p0 = unsafe.Pointer(&buf[0])
|
|
||||||
- } else {
|
|
||||||
- _p0 = unsafe.Pointer(&_zero)
|
|
||||||
- }
|
|
||||||
- r0, _, e1 := syscall_syscall6(funcPC(libc___getdirentries64_trampoline), uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
|
||||||
- n = int(r0)
|
|
||||||
- if e1 != 0 {
|
|
||||||
- err = errnoErr(e1)
|
|
||||||
- }
|
|
||||||
- return
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-func libc___getdirentries64_trampoline()
|
|
||||||
-
|
|
||||||
-//go:linkname libc___getdirentries64 libc___getdirentries64
|
|
||||||
-//go:cgo_import_dynamic libc___getdirentries64 __getdirentries64 "/usr/lib/libSystem.B.dylib"
|
|
||||||
-
|
|
||||||
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
||||||
-
|
|
||||||
func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
|
|
||||||
r0, _, e1 := syscall_syscall(funcPC(libc_getfsstat64_trampoline), uintptr(buf), uintptr(size), uintptr(flags))
|
|
||||||
n = int(r0)
|
|
||||||
diff --git a/unix/zsyscall_darwin_amd64.s b/unix/zsyscall_darwin_amd64.s
|
|
||||||
index 1a39151..a19c4f5 100644
|
|
||||||
--- a/unix/zsyscall_darwin_amd64.s
|
|
||||||
+++ b/unix/zsyscall_darwin_amd64.s
|
|
||||||
@@ -274,8 +274,6 @@ TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatat64(SB)
|
|
||||||
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_fstatfs64(SB)
|
|
||||||
-TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
- JMP libc___getdirentries64(SB)
|
|
||||||
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
JMP libc_getfsstat64(SB)
|
|
||||||
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user